You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package also has sub dependencies with vulnerabilities
Version used
14.2.0
Notes
Might help
System.Reflection.Assembly.GetEntryAssembly().GetCustomAttribute()
but you need to extract the version manually
I would create a PR that replaces the 2 lines of code (and extracts the version) but I am not sure if I understand the implications.
and the whole, substring the version might not be that good.
The file impacted would be
RuntimeUtilities
//-----------------------------------------------------------------------// <copyright file="RuntimeUtilities.cs" company="NSwag">// Copyright (c) Rico Suter. All rights reserved.// </copyright>// <license>https://github.com/RicoSuter/NSwag/blob/master/LICENSE.md</license>// <author>Rico Suter, [email protected]</author>//-----------------------------------------------------------------------
#if !NETFRAMEWORKusingSystem.Reflection;usingSystem.Runtime.Versioning;usingSystem.Globalization;
#endif
namespaceNSwag.Commands{/// <summary>Provides runtime utilities.</summary>publicclassRuntimeUtilities{/// <summary>Gets the current runtime.</summary>publicstaticRuntimeCurrentRuntime{get{
#if NETFRAMEWORKreturnIntPtr.Size==4?Runtime.WinX86:Runtime.WinX64;
#else
vartarget=Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>();if(target==null||!target.FrameworkName.StartsWith(".NETCoreApp",StringComparison.OrdinalIgnoreCase))returnIntPtr.Size==4?Runtime.WinX86:Runtime.WinX64;varversion=target.FrameworkName.Substring(target.FrameworkName.IndexOf("Version=v",StringComparison.OrdinalIgnoreCase)+9);varmajorV=int.Parse(version.Split('.')[0],CultureInfo.InvariantCulture);if(majorV>=9)returnRuntime.Net90;returnRuntime.Net80;
#endif
}}}}
The text was updated successfully, but these errors were encountered:
Describe the bug
Microsoft.Extensions.PlatformAbstractions is deprecated
https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/5.0/platformabstractions-package-removed
This package also has sub dependencies with vulnerabilities
Version used
14.2.0
Notes
Might help
System.Reflection.Assembly.GetEntryAssembly().GetCustomAttribute()
but you need to extract the version manually
I would create a PR that replaces the 2 lines of code (and extracts the version) but I am not sure if I understand the implications.
and the whole, substring the version might not be that good.
The file impacted would be
RuntimeUtilities
The text was updated successfully, but these errors were encountered: