523 instantiations of Version
Aspire.Cli.Tests (17)
Utils\ContainerRuntimeCheckTests.cs (17)
19Assert.Equal(new Version(28, 0, 4), clientVersion);
21Assert.Equal(new Version(28, 0, 4), serverVersion);
35Assert.Equal(new Version(28, 5, 1), clientVersion);
37Assert.Equal(new Version(28, 5, 1), serverVersion);
51Assert.Equal(new Version(29, 1, 3), clientVersion);
53Assert.Equal(new Version(29, 1, 3), serverVersion);
67Assert.Equal(new Version(4, 9, 3), clientVersion);
82Assert.Equal(new Version(29, 1, 3), clientVersion);
96Assert.Equal(new Version(19, 3, 15), clientVersion);
110Assert.Equal(new Version(20, 10), clientVersion);
143Assert.Equal(new Version(1, 0, 0), serverVersion);
183Assert.Equal(new Version(28, 0, 4), clientVersion);
185Assert.Equal(new Version(27, 5, 1), serverVersion);
199Assert.Equal(new Version(28, 0, 4), clientVersion);
201Assert.Equal(new Version(28, 0, 4), serverVersion);
256Assert.Equal(new Version(27, 5, 1), result);
271Assert.Equal(new Version(4, 3, 1), result);
Aspire.Confluent.Kafka (1)
Aspire.Hosting (2)
Aspire.Hosting.DevTunnels (1)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (4)
Aspire.StackExchange.Redis (1)
dotnet (8)
dotnet-svcutil-lib (7)
GenerateDocumentationAndConfigFiles (2)
ILAssembler (4)
ILCompiler.Build.Tasks (1)
ILCompiler.Compiler (5)
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (3)
46_metadataBuilder.AddAssembly(assemblyNameHandle, assemblyName.Version ?? new Version(0, 0, 0, 0), default(StringHandle), publicKey: publicKeyArray != null ? _metadataBuilder.GetOrAddBlob(publicKeyArray) : default(BlobHandle), flags, AssemblyHashAlgorithm.None);
60var canonAssemblyRef = _metadataBuilder.AddAssemblyReference(canonAssemblyNameHandle, new Version(0, 0, 0, 0), default(StringHandle), default(BlobHandle), (AssemblyFlags)0, default(BlobHandle));
142Version version = name.Version ?? new Version(0, 0);
ILCompiler.Diagnostics (1)
ILCompiler.ReadyToRun (4)
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (3)
46_metadataBuilder.AddAssembly(assemblyNameHandle, assemblyName.Version ?? new Version(0, 0, 0, 0), default(StringHandle), publicKey: publicKeyArray != null ? _metadataBuilder.GetOrAddBlob(publicKeyArray) : default(BlobHandle), flags, AssemblyHashAlgorithm.None);
60var canonAssemblyRef = _metadataBuilder.AddAssemblyReference(canonAssemblyNameHandle, new Version(0, 0, 0, 0), default(StringHandle), default(BlobHandle), (AssemblyFlags)0, default(BlobHandle));
142Version version = name.Version ?? new Version(0, 0);
illink (2)
ILLink.RoslynAnalyzer (3)
installer.tasks (2)
Microsoft.AspNetCore.Server.IISIntegration (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.Build (3)
Microsoft.Build.Framework (41)
ChangeWaves.cs (10)
30internal static readonly Version Wave17_10 = new Version(17, 10);
31internal static readonly Version Wave17_12 = new Version(17, 12);
32internal static readonly Version Wave17_14 = new Version(17, 14);
33internal static readonly Version Wave18_3 = new Version(18, 3);
34internal static readonly Version Wave18_4 = new Version(18, 4);
35internal static readonly Version Wave18_5 = new Version(18, 5);
36internal static readonly Version Wave18_6 = new Version(18, 6);
37internal static readonly Version Wave18_7 = new Version(18, 7);
38internal static readonly Version Wave18_8 = new Version(18, 8);
44internal static readonly Version EnableAllFeatures = new Version(999, 999);
Utilities\FrameworkLocationHelper.cs (24)
53internal static readonly Version dotNetFrameworkVersion11 = new Version(1, 1);
54internal static readonly Version dotNetFrameworkVersion20 = new Version(2, 0);
55internal static readonly Version dotNetFrameworkVersion30 = new Version(3, 0);
56internal static readonly Version dotNetFrameworkVersion35 = new Version(3, 5);
57internal static readonly Version dotNetFrameworkVersion40 = new Version(4, 0);
58internal static readonly Version dotNetFrameworkVersion45 = new Version(4, 5);
59internal static readonly Version dotNetFrameworkVersion451 = new Version(4, 5, 1);
60internal static readonly Version dotNetFrameworkVersion452 = new Version(4, 5, 2);
61internal static readonly Version dotNetFrameworkVersion46 = new Version(4, 6);
62internal static readonly Version dotNetFrameworkVersion461 = new Version(4, 6, 1);
63internal static readonly Version dotNetFrameworkVersion462 = new Version(4, 6, 2);
64internal static readonly Version dotNetFrameworkVersion47 = new Version(4, 7);
65internal static readonly Version dotNetFrameworkVersion471 = new Version(4, 7, 1);
66internal static readonly Version dotNetFrameworkVersion472 = new Version(4, 7, 2);
67internal static readonly Version dotNetFrameworkVersion48 = new Version(4, 8);
68internal static readonly Version dotNetFrameworkVersion481 = new Version(4, 8, 1);
71internal static readonly Version visualStudioVersion100 = new Version(10, 0);
72internal static readonly Version visualStudioVersion110 = new Version(11, 0);
73internal static readonly Version visualStudioVersion120 = new Version(12, 0);
74internal static readonly Version visualStudioVersion140 = new Version(14, 0);
75internal static readonly Version visualStudioVersion150 = new Version(15, 0);
76internal static readonly Version visualStudioVersion160 = new Version(16, 0);
77internal static readonly Version visualStudioVersion170 = new Version(17, 0);
78internal static readonly Version visualStudioVersion180 = new Version(18, 0);
Microsoft.Build.Tasks.Core (32)
ManifestUtil\Util.cs (6)
120v = new Version(s_clrVersion4[0], s_clrVersion4[1], s_clrVersion4[2], s_clrVersion4[3]);
143Version currentVersion = new Version(s_clrVersion4[0], s_clrVersion4[1], s_clrVersion4[2], s_clrVersion4[3]);
152clrVersion = new Version(currentVersion.Major, currentVersion.Minor, currentVersion.Build, 0);
158clrVersion = new Version(s_clrVersion4[0], s_clrVersion4[1], s_clrVersion4[2], s_clrVersion4[3]);
331version = new Version(value);
628return new Version(version);
Microsoft.Build.Utilities.Core (7)
Microsoft.CodeAnalysis (8)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.Scripting (2)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.DiaSymReader (1)
Microsoft.DotNet.Build.Tasks.Packaging (14)
Microsoft.DotNet.Build.Tasks.Workloads (4)
Microsoft.DotNet.HotReload.Watch (3)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (2)
Microsoft.DotNet.TemplateLocator (4)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.Extensions.Identity.Core (4)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Maui.Essentials (2)
Microsoft.ML.TestFramework (4)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.NET.Build.Tasks (23)
Microsoft.NET.HostModel (1)
Microsoft.NET.Sdk.Publish.Tasks (7)
Microsoft.NET.Sdk.Razor.Tasks (1)
Microsoft.NET.Sdk.WorkloadManifestReader (3)
Microsoft.SourceLink.Bitbucket.Git (1)
Microsoft.SourceLink.GitLab (1)
Microsoft.TestPlatform.CoreUtilities (1)
Microsoft.TestPlatform.TestHostRuntimeProvider (5)
Microsoft.VisualStudio.TestPlatform.ObjectModel (90)
Mono.Cecil (10)
NuGet.Commands (2)
NuGet.Frameworks (95)
DefaultFrameworkMappings.cs (15)
131new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCore, new Version(4, 5, 0, 0))),
135new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCore, new Version(4, 5, 0, 0)),
136new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.WinRT, new Version(4, 5, 0, 0))),
141new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCore, new Version(4, 5, 0, 0))),
146new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.WinRT, new Version(4, 5, 0, 0))),
151new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCore, new Version(4, 5, 1, 0))),
161new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Silverlight, new Version(3, 0, 0, 0), "WindowsPhone")),
165new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.WindowsPhone, new Version(7, 1, 0, 0)),
166new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Silverlight, new Version(4, 0, 0, 0), "WindowsPhone71")),
171new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Silverlight, new Version(8, 0, 0, 0), "WindowsPhone")),
176new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Silverlight, new Version(8, 1, 0, 0), "WindowsPhone")),
293new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Windows, new Version(8, 1, 0, 0)))),
301new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.WindowsPhoneApp, new Version(8, 1, 0, 0)))),
317new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.WinRT, new Version(4, 5, 0, 0)))),
336new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.UAP, new Version(10, 0, 15064, 0)),
DefaultPortableFrameworkMappings.cs (6)
110var monoandroid = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.MonoAndroid, new Version(0, 0));
111var monotouch = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.MonoTouch, new Version(0, 0));
112var xamarinIOs = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinIOs, new Version(0, 0));
113var xamarinMac = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinMac, new Version(0, 0));
114var xamarinTVOS = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinTVOS, new Version(0, 0));
115var xamarinWatchOS = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinWatchOS, new Version(0, 0));
FrameworkConstants.cs (70)
10public static readonly Version EmptyVersion = new Version(0, 0, 0, 0);
11public static readonly Version MaxVersion = new Version(int.MaxValue, 0, 0, 0);
12public static readonly Version Version5 = new Version(5, 0, 0, 0);
13public static readonly Version Version6 = new Version(6, 0, 0, 0);
14public static readonly Version Version7 = new Version(7, 0, 0, 0);
15public static readonly Version Version8 = new Version(8, 0, 0, 0);
16public static readonly Version Version9 = new Version(9, 0, 0, 0);
17public static readonly Version Version10 = new Version(10, 0, 0, 0);
18public static readonly Version Version11 = new Version(11, 0, 0, 0);
80public static readonly NuGetFramework Net11 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(1, 1, 0, 0));
82public static readonly NuGetFramework Net2 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(2, 0, 0, 0));
84public static readonly NuGetFramework Net35 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(3, 5, 0, 0));
86public static readonly NuGetFramework Net4 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 0, 0, 0));
88public static readonly NuGetFramework Net403 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 0, 3, 0));
90public static readonly NuGetFramework Net45 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 5, 0, 0));
92public static readonly NuGetFramework Net451 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 5, 1, 0));
94public static readonly NuGetFramework Net452 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 5, 2, 0));
96public static readonly NuGetFramework Net46 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 6, 0, 0));
98public static readonly NuGetFramework Net461 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 6, 1, 0));
100public static readonly NuGetFramework Net462 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 6, 2, 0));
102public static readonly NuGetFramework Net463 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 6, 3, 0));
104public static readonly NuGetFramework Net47 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 7, 0, 0));
106public static readonly NuGetFramework Net471 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 7, 1, 0));
108public static readonly NuGetFramework Net472 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 7, 2, 0));
110public static readonly NuGetFramework Net48 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 8, 0, 0));
112public static readonly NuGetFramework Net481 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 8, 1, 0));
116public static readonly NuGetFramework NetCore45 = new NuGetFramework(FrameworkIdentifiers.NetCore, new Version(4, 5, 0, 0));
119public static readonly NuGetFramework NetCore451 = new NuGetFramework(FrameworkIdentifiers.NetCore, new Version(4, 5, 1, 0));
122public static readonly NuGetFramework NetCore50 = new NuGetFramework(FrameworkIdentifiers.NetCore, new Version(5, 0, 0, 0));
124public static readonly NuGetFramework Win8 = new NuGetFramework(FrameworkIdentifiers.Windows, new Version(8, 0, 0, 0));
125public static readonly NuGetFramework Win81 = new NuGetFramework(FrameworkIdentifiers.Windows, new Version(8, 1, 0, 0));
126public static readonly NuGetFramework Win10 = new NuGetFramework(FrameworkIdentifiers.Windows, new Version(10, 0, 0, 0));
128public static readonly NuGetFramework SL4 = new NuGetFramework(FrameworkIdentifiers.Silverlight, new Version(4, 0, 0, 0));
129public static readonly NuGetFramework SL5 = new NuGetFramework(FrameworkIdentifiers.Silverlight, new Version(5, 0, 0, 0));
131public static readonly NuGetFramework WP7 = new NuGetFramework(FrameworkIdentifiers.WindowsPhone, new Version(7, 0, 0, 0));
132public static readonly NuGetFramework WP75 = new NuGetFramework(FrameworkIdentifiers.WindowsPhone, new Version(7, 5, 0, 0));
133public static readonly NuGetFramework WP8 = new NuGetFramework(FrameworkIdentifiers.WindowsPhone, new Version(8, 0, 0, 0));
134public static readonly NuGetFramework WP81 = new NuGetFramework(FrameworkIdentifiers.WindowsPhone, new Version(8, 1, 0, 0));
135public static readonly NuGetFramework WPA81 = new NuGetFramework(FrameworkIdentifiers.WindowsPhoneApp, new Version(8, 1, 0, 0));
137public static readonly NuGetFramework Tizen3 = new NuGetFramework(FrameworkIdentifiers.Tizen, new Version(3, 0, 0, 0));
138public static readonly NuGetFramework Tizen4 = new NuGetFramework(FrameworkIdentifiers.Tizen, new Version(4, 0, 0, 0));
139public static readonly NuGetFramework Tizen6 = new NuGetFramework(FrameworkIdentifiers.Tizen, new Version(6, 0, 0, 0));
147public static readonly NuGetFramework Dnx45 = new NuGetFramework(FrameworkIdentifiers.Dnx, new Version(4, 5, 0, 0));
148public static readonly NuGetFramework Dnx451 = new NuGetFramework(FrameworkIdentifiers.Dnx, new Version(4, 5, 1, 0));
149public static readonly NuGetFramework Dnx452 = new NuGetFramework(FrameworkIdentifiers.Dnx, new Version(4, 5, 2, 0));
158= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 1, 0, 0));
160= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 2, 0, 0));
162= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 3, 0, 0));
164= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 4, 0, 0));
166= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 5, 0, 0));
168= new NuGetFramework(FrameworkIdentifiers.NetPlatform, new Version(5, 6, 0, 0));
174= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 0, 0, 0));
177= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 1, 0, 0));
180= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 2, 0, 0));
183= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 3, 0, 0));
186= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 4, 0, 0));
189= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 5, 0, 0));
192= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 6, 0, 0));
195= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(1, 7, 0, 0));
198= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(2, 0, 0, 0));
201= new NuGetFramework(FrameworkIdentifiers.NetStandard, new Version(2, 1, 0, 0));
204= new NuGetFramework(FrameworkIdentifiers.NetStandardApp, new Version(1, 5, 0, 0));
211= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(1, 0, 0, 0));
214= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(1, 1, 0, 0));
217= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(2, 0, 0, 0));
220= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(2, 1, 0, 0));
223= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(2, 2, 0, 0));
226= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(3, 0, 0, 0));
229= new NuGetFramework(FrameworkIdentifiers.NetCoreApp, new Version(3, 1, 0, 0));
247public static readonly NuGetFramework Native = new NuGetFramework(FrameworkIdentifiers.Native, new Version(0, 0, 0, 0));
NuGet.Packaging (3)
NuGet.Versioning (7)
NuGetVersion.cs (2)
94: this(new Version(major, minor, patch, 0), releaseLabels, metadata, null)
134: this(new Version(major, minor, patch, revision), releaseLabels, metadata, null)
SemanticVersion.cs (2)
80: this(new Version(major, minor, patch, 0), releaseLabels, metadata)
119: this(new Version(major, minor, patch, revision), releaseLabels, metadata)
PresentationBuildTasks (4)
MS\Internal\MarkupCompiler\VersionHelper.cs (4)
16private static readonly Version NullVersion = new Version(0, 0, 0, 0);
157version = new Version(values[0], values[1], values[2], values[3]);
206return new Version(pattern.Major, pattern.Minor, (ushort)build, (ushort)revision);
210return new Version(pattern.Major, pattern.Minor, pattern.Build, (ushort)revision);
PresentationCore (5)
PresentationFramework (5)
RepoTasks (1)
Shared.Tests (1)
System.ComponentModel.TypeConverter (2)
System.Data.Common (2)
System.Diagnostics.DiagnosticSource (1)
System.Management (2)
System.Net.Http (1)
System.Net.Http.WinHttpHandler (3)
System.Net.HttpListener (1)
System.Net.Primitives (5)
System.Net.Quic (4)
System.Net.Requests (1)
System.Private.CoreLib (10)
System.Private.Xml (1)
System.Reflection.Emit (2)
System.Reflection.Metadata (6)
System.Reflection.MetadataLoadContext (4)
System.Windows.Forms (5)
1530 references to Version
aspire (17)
Aspire.Cli.Tests (7)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (13)
Aspire.Hosting.DevTunnels (6)
Aspire.Hosting.DevTunnels.Tests (4)
Aspire.Hosting.DotnetTool.Tests (2)
Aspire.Hosting.RemoteHost (3)
Aspire.Hosting.Yarp (4)
Aspire.Hosting.Yarp.Tests (1)
Aspire.StackExchange.Redis (1)
ConfigurationSchemaGenerator (1)
dotnet (15)
dotnet-svcutil-lib (8)
GenerateDocumentationAndConfigFiles (37)
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (23)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
47Action<string, Version, string, SourceText, TextLine> onDuplicateEntryInRelease,
52var currentVersion = UnshippedVersion;
55using var _ = PooledHashSet<Version>.GetInstance(out var versionsBuilder);
78if (!Version.TryParse(versionString, out var version))
338public ImmutableHashSet<Version> Versions { get; }
341: this(ImmutableSortedDictionary<string, ReleaseTrackingDataForRule>.Empty, ImmutableHashSet<Version>.Empty)
345internal ReleaseTrackingData(ImmutableSortedDictionary<string, ReleaseTrackingDataForRule> releaseTrackingDataByRuleIdMap, ImmutableHashSet<Version> versions)
353[NotNullWhen(returnValue: true)] out Version? version,
359Version maxVersion,
360[NotNullWhen(returnValue: true)] out Version? version,
366Version? maxVersion,
367[NotNullWhen(returnValue: true)] out Version? version,
397public ImmutableSortedDictionary<Version, ReleaseTrackingLine> ReleasesByVersionMap { get; }
408private readonly ImmutableSortedDictionary<Version, ReleaseTrackingLine>.Builder _builder
409= ImmutableSortedDictionary.CreateBuilder<Version, ReleaseTrackingLine>(ReverseComparer.Instance);
411public void AddEntry(Version version, ReleaseTrackingLine releaseTrackingLine, out bool hasExistingEntry)
417public ImmutableSortedDictionary<Version, ReleaseTrackingLine> ToImmutable()
420private sealed class ReverseComparer : IComparer<Version>
422public static readonly IComparer<Version> Instance = new ReverseComparer();
425public int Compare([AllowNull] Version x, [AllowNull] Version y)
ILAssembler (2)
ILCompiler.Build.Tasks (1)
ILCompiler.Compiler (4)
ILCompiler.Diagnostics (1)
ILCompiler.ReadyToRun (6)
illink (3)
ILLink.RoslynAnalyzer (8)
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (2)
13public static unsafe string ComputeDisplayName(string name, Version? version, string? cultureName, byte[]? pkt, AssemblyNameFlags flags = 0, AssemblyContentType contentType = 0, byte[]? pk = null)
20public static void AppendDisplayName(ref ValueStringBuilder vsb, string name, Version? version, string? cultureName, byte[]? pkt, AssemblyNameFlags flags = 0, AssemblyContentType contentType = 0, byte[]? pk = null)
installer.tasks (8)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.Build (68)
Microsoft.Build.Framework (106)
ChangeWaves.cs (18)
30internal static readonly Version Wave17_10 = new Version(17, 10);
31internal static readonly Version Wave17_12 = new Version(17, 12);
32internal static readonly Version Wave17_14 = new Version(17, 14);
33internal static readonly Version Wave18_3 = new Version(18, 3);
34internal static readonly Version Wave18_4 = new Version(18, 4);
35internal static readonly Version Wave18_5 = new Version(18, 5);
36internal static readonly Version Wave18_6 = new Version(18, 6);
37internal static readonly Version Wave18_7 = new Version(18, 7);
38internal static readonly Version Wave18_8 = new Version(18, 8);
39internal static readonly Version[] AllWaves = [Wave17_10, Wave17_12, Wave17_14, Wave18_3, Wave18_4, Wave18_5, Wave18_6, Wave18_7, Wave18_8];
44internal static readonly Version EnableAllFeatures = new Version(999, 999);
56internal static Version LowestWave
67internal static Version HighestWave
86private static Version _cachedWave;
91internal static Version DisabledWave
176internal static bool AreFeaturesEnabled(Version wave)
200private static bool TryParseVersion(string stringVersion, out Version version)
214return Version.TryParse(stringVersion, out version);
Utilities\FrameworkLocationHelper.cs (59)
53internal static readonly Version dotNetFrameworkVersion11 = new Version(1, 1);
54internal static readonly Version dotNetFrameworkVersion20 = new Version(2, 0);
55internal static readonly Version dotNetFrameworkVersion30 = new Version(3, 0);
56internal static readonly Version dotNetFrameworkVersion35 = new Version(3, 5);
57internal static readonly Version dotNetFrameworkVersion40 = new Version(4, 0);
58internal static readonly Version dotNetFrameworkVersion45 = new Version(4, 5);
59internal static readonly Version dotNetFrameworkVersion451 = new Version(4, 5, 1);
60internal static readonly Version dotNetFrameworkVersion452 = new Version(4, 5, 2);
61internal static readonly Version dotNetFrameworkVersion46 = new Version(4, 6);
62internal static readonly Version dotNetFrameworkVersion461 = new Version(4, 6, 1);
63internal static readonly Version dotNetFrameworkVersion462 = new Version(4, 6, 2);
64internal static readonly Version dotNetFrameworkVersion47 = new Version(4, 7);
65internal static readonly Version dotNetFrameworkVersion471 = new Version(4, 7, 1);
66internal static readonly Version dotNetFrameworkVersion472 = new Version(4, 7, 2);
67internal static readonly Version dotNetFrameworkVersion48 = new Version(4, 8);
68internal static readonly Version dotNetFrameworkVersion481 = new Version(4, 8, 1);
71internal static readonly Version visualStudioVersion100 = new Version(10, 0);
72internal static readonly Version visualStudioVersion110 = new Version(11, 0);
73internal static readonly Version visualStudioVersion120 = new Version(12, 0);
74internal static readonly Version visualStudioVersion140 = new Version(14, 0);
75internal static readonly Version visualStudioVersion150 = new Version(15, 0);
76internal static readonly Version visualStudioVersion160 = new Version(16, 0);
77internal static readonly Version visualStudioVersion170 = new Version(17, 0);
78internal static readonly Version visualStudioVersion180 = new Version(18, 0);
81internal static readonly Version visualStudioVersionLatest = visualStudioVersion180;
433private static readonly Lazy<IReadOnlyDictionary<Version, DotNetFrameworkSpec>> DotNetFrameworkSpecDict = new(() => DotNetFrameworkSpecs().ToDictionary(spec => spec.Version));
434private static readonly Lazy<IReadOnlyDictionary<Version, VisualStudioSpec>> VisualStudioSpecDict = new(() => VisualStudioSpecs.Value.ToDictionary(spec => spec.Version));
664internal static string GetDotNetFrameworkSdkRootRegistryKey(Version dotNetFrameworkVersion, Version visualStudioVersion)
679internal static string GetDotNetFrameworkSdkInstallKeyValue(Version dotNetFrameworkVersion, Version visualStudioVersion)
694internal static string GetDotNetFrameworkVersionFolderPrefix(Version dotNetFrameworkVersion)
699internal static string GetPathToWindowsSdk(Version dotNetFrameworkVersion)
704internal static string GetPathToDotNetFrameworkReferenceAssemblies(Version dotNetFrameworkVersion)
709internal static string GetPathToDotNetFrameworkSdkTools(Version dotNetFrameworkVersion, Version visualStudioVersion)
724internal static string GetPathToDotNetFrameworkSdk(Version dotNetFrameworkVersion, Version visualStudioVersion)
769internal static string GetPathToDotNetFramework(Version version)
774internal static string GetPathToDotNetFramework(Version version, DotNetFrameworkArchitecture architecture)
1173private static VisualStudioSpec GetVisualStudioSpec(Version version)
1178private static DotNetFrameworkSpec GetDotNetFrameworkSpec(Version version)
1190private static DotNetFrameworkSpec CreateDotNetFrameworkSpecForV4(Version version, Version visualStudioVersion)
1203private static void RedirectVersionsIfNecessary(ref Version dotNetFrameworkVersion, ref Version visualStudioVersion)
1232Version version,
1236Version[] supportedDotNetFrameworkVersions)
1248public Version Version { get; }
1253public Version[] SupportedDotNetFrameworkVersions { get; }
1269public string GetDotNetFrameworkSdkRegistryKey(Version dotNetSdkVersion)
1333private readonly ConcurrentDictionary<Version, string> _pathsToDotNetFrameworkSdkTools;
1363Version version,
1370Version visualStudioVersion = null)
1378this._pathsToDotNetFrameworkSdkTools = new ConcurrentDictionary<Version, string>();
1390public Version Version { get; }
1649private static string FallbackToDefaultPathToDotNetFrameworkSdkTools(Version dotNetFrameworkVersion)
1675Version version,
1742Version version,
Microsoft.Build.Tasks.Core (128)
AssemblyDependency\ReferenceTable.cs (13)
30private static readonly Version s_targetFrameworkVersion_40 = new Version("4.0");
107private readonly Version _targetedRuntimeVersion;
125private readonly Version _projectTargetFramework;
302Version targetedRuntimeVersion,
303Version projectTargetFramework,
1121bool isUnified = UnifyAssemblyNameVersions(dependentAssembly, out Version unifiedVersion, out UnificationReason unificationReason, out bool isPrerequisite, out bool? isRedistRoot, out string redistName);
1926Version version = baseKey.Version;
1933Version lastVersion = conflictingReference.assemblyName.Version;
1957var zeroVersion = new Version(0, 0, 0, 0);
2411Version leftConflictVersion = assemblyReference0.assemblyName.Version;
2412Version rightConflictVersion = assemblyReference1.assemblyName.Version;
2482Version redistListVersion = redistListEntry.AssemblyNameExtension.Version;
2505out Version unifiedVersion,
ResolveSDKReference.cs (15)
81private static readonly Version s_defaultTargetPlatformVersion = new Version("7.0");
96private Version _targetPlatformVersion;
189if (Version.TryParse(value, out Version versionValue))
254private Version TargetPlatformAsVersion
592parsedVersion = Version.TryParse(rawSdkVersion, out _);
912public void Resolve(Dictionary<string, ITaskItem> sdks, string targetConfiguration, string targetArchitecture, HashSet<string> sdkNamesOnReferenceItems, bool treatErrorsAsWarnings, bool prefer32Bit, string identifierTargetPlatform, Version versionTargetPlatform, string projectName, bool enableMaxPlatformVersionEmptyWarning)
921System.Version.TryParse(sdk.GetMetadata(SDKPlatformVersion), out Version targetPlatformVersionFromItem);
1171private void CreateResolvedReferenceItem(string targetConfiguration, string targetArchitecture, HashSet<string> sdkNamesOnReferenceItems, string targetPlatformIdentifier, Version targetPlatformVersion, Version targetPlatformVersionFromItem, string projectName, bool enableMaxPlatformVersionEmptyWarning)
1254if (System.Version.TryParse(MaxPlatformVersion, out Version maxPlatformVersionAsVersion) && (maxPlatformVersionAsVersion < targetPlatformVersion))
1271if (System.Version.TryParse(TargetPlatformMinVersion, out Version targetPlatformMinVersionAsVersion) && (targetPlatformVersion < targetPlatformMinVersionAsVersion))
Microsoft.Build.Utilities.Core (106)
ToolLocationHelper.cs (66)
377public static IDictionary<string, string> GetPlatformExtensionSDKLocations(string targetPlatformIdentifier, Version targetPlatformVersion)
389public static IDictionary<string, string> GetPlatformExtensionSDKLocations(string[] diskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
402public static IDictionary<string, string> GetPlatformExtensionSDKLocations(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
423public static IDictionary<string, Tuple<string, string>> GetPlatformExtensionSDKLocationsAndVersions(string targetPlatformIdentifier, Version targetPlatformVersion)
435public static IDictionary<string, Tuple<string, string>> GetPlatformExtensionSDKLocationsAndVersions(string[] diskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
448public static IDictionary<string, Tuple<string, string>> GetPlatformExtensionSDKLocationsAndVersions(string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
466private static IEnumerable<TargetPlatformSDK> GetTargetPlatformMonikers(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
483.OrderBy<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion);
495public static string GetPlatformExtensionSDKLocation(string sdkMoniker, string targetPlatformIdentifier, Version targetPlatformVersion)
509public static string GetPlatformExtensionSDKLocation(string sdkMoniker, string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string registryRoot)
524public static string GetPlatformExtensionSDKLocation(string sdkMoniker, string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] extensionDiskRoots, string registryRoot)
539.OrderByDescending<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion)
606if (Version.TryParse(targetPlatformVersion, out Version platformVersion))
622public static IDictionary<string, string> FilterPlatformExtensionSDKs(Version targetPlatformVersion, IDictionary<string, string> extensionSdks)
787public static IList<TargetPlatformSDK> FilterTargetPlatformSdks(IList<TargetPlatformSDK> targetPlatformSdkList, Version osVersion, Version vsVersion)
1251public static string GetPlatformSDKLocation(string targetPlatformIdentifier, Version targetPlatformVersion)
1263public static string GetPlatformSDKLocation(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string registryRoot)
1299if (Version.TryParse(targetPlatformVersion, out Version platformVersion))
1327public static IEnumerable<string> GetPlatformsForSDK(string sdkIdentifier, Version sdkVersion) => GetPlatformsForSDK(sdkIdentifier, sdkVersion, null, null);
1337public static IEnumerable<string> GetPlatformsForSDK(string sdkIdentifier, Version sdkVersion, string[] diskRoots, string registryRoot)
1381var availablePlatformVersions = new List<Version>();
1384Version platformVersion;
1410public static IEnumerable<string> GetFoldersInVSInstalls(Version minVersion = null, Version maxVersion = null, string subFolder = null)
1454Version minVersion, maxVersion;
1456if (string.IsNullOrEmpty(minVersionString) || !Version.TryParse(minVersionString, out minVersion))
1460if (string.IsNullOrEmpty(maxVersionString) || !Version.TryParse(maxVersionString, out maxVersion))
1532private static bool TryParsePlatformVersion(string platformMoniker, out Version platformVersion)
1576if (Version.TryParse(targetPlatformVersion, out Version platformVersion))
1588private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot)
1660var dotNetFrameworkVersion = TargetDotNetFrameworkVersionToSystemVersion(version);
1661var vsVersion = VisualStudioVersionToSystemVersion(visualStudioVersion);
1681var dotNetFrameworkVersion = TargetDotNetFrameworkVersionToSystemVersion(version);
1682var vsVersion = VisualStudioVersionToSystemVersion(visualStudioVersion);
1701Version frameworkVersion = TargetDotNetFrameworkVersionToSystemVersion(version);
1733var dotNetFrameworkVersion = TargetDotNetFrameworkVersionToSystemVersion(version);
1734var vsVersion = VisualStudioVersionToSystemVersion(visualStudioVersion);
1819Version frameworkVersion = ConvertTargetFrameworkVersionToVersion(targetFrameworkVersion);
1923Version frameworkVersion = ConvertTargetFrameworkVersionToVersion(targetFrameworkVersion);
2001var dotNetFrameworkVersion = TargetDotNetFrameworkVersionToSystemVersion(version);
2002var vsVersion = VisualStudioVersionToSystemVersion(visualStudioVersion);
2006private static Version TargetDotNetFrameworkVersionToSystemVersion(TargetDotNetFrameworkVersion version)
2065private static Version VisualStudioVersionToSystemVersion(VisualStudioVersion version)
2080Version Unsupported()
2543if (Version.TryParse(sdkVersionDirectory.Name, out Version _))
2606SortedDictionary<Version, List<string>> versionsInRoot = VersionUtilities.GatherVersionStrings(null, rootPathWithIdentifier.GetDirectories().Select<DirectoryInfo, string>(directory => directory.Name));
2611foreach (KeyValuePair<Version, List<string>> directoryUnderRoot in versionsInRoot)
2715SortedDictionary<Version, List<string>> sortedVersions = VersionUtilities.GatherVersionStrings(null, versions);
2717foreach (KeyValuePair<Version, List<string>> registryVersions in sortedVersions)
2807Version tempVersion;
2808if (Version.TryParse(sdkVersion, out tempVersion))
3046Version tempVersion;
3047if (Version.TryParse(platformVersion.Name, out tempVersion))
3648Version version = VersionUtilities.ConvertToVersion(frameworkVersion);
3693Version targetFrameworkVersion = ConvertTargetFrameworkVersionToVersion(frameworkVersions[frameworkVersions.Count - 1]);
3744private static Version ConvertTargetFrameworkVersionToVersion(string targetFrameworkVersion)
3750return Version.Parse(targetFrameworkVersion.AsSpan(1));
3872if (Version.TryParse(
3928Version ver = VersionUtilities.ConvertToVersion(frameworkVersion);
4001return Version.Parse(versionX.AsSpan(1)).CompareTo(Version.Parse(versionY.AsSpan(1)));
Microsoft.CodeAnalysis (53)
Microsoft.CodeAnalysis.Analyzers (28)
MetaAnalyzers\ReleaseTrackingHelper.cs (23)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
47Action<string, Version, string, SourceText, TextLine> onDuplicateEntryInRelease,
52var currentVersion = UnshippedVersion;
55using var _ = PooledHashSet<Version>.GetInstance(out var versionsBuilder);
78if (!Version.TryParse(versionString, out var version))
338public ImmutableHashSet<Version> Versions { get; }
341: this(ImmutableSortedDictionary<string, ReleaseTrackingDataForRule>.Empty, ImmutableHashSet<Version>.Empty)
345internal ReleaseTrackingData(ImmutableSortedDictionary<string, ReleaseTrackingDataForRule> releaseTrackingDataByRuleIdMap, ImmutableHashSet<Version> versions)
353[NotNullWhen(returnValue: true)] out Version? version,
359Version maxVersion,
360[NotNullWhen(returnValue: true)] out Version? version,
366Version? maxVersion,
367[NotNullWhen(returnValue: true)] out Version? version,
397public ImmutableSortedDictionary<Version, ReleaseTrackingLine> ReleasesByVersionMap { get; }
408private readonly ImmutableSortedDictionary<Version, ReleaseTrackingLine>.Builder _builder
409= ImmutableSortedDictionary.CreateBuilder<Version, ReleaseTrackingLine>(ReverseComparer.Instance);
411public void AddEntry(Version version, ReleaseTrackingLine releaseTrackingLine, out bool hasExistingEntry)
417public ImmutableSortedDictionary<Version, ReleaseTrackingLine> ToImmutable()
420private sealed class ReverseComparer : IComparer<Version>
422public static readonly IComparer<Version> Instance = new ReverseComparer();
425public int Compare([AllowNull] Version x, [AllowNull] Version y)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (15)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Microsoft.CodeAnalysis.Scripting (7)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (6)
Microsoft.Deployment.DotNet.Releases (5)
Microsoft.Diagnostics.DataContractReader.Legacy (2)
Microsoft.Diagnostics.NETCore.Client (2)
Microsoft.DiaSymReader (1)
Microsoft.DotNet.ApiCompat.Task (1)
Microsoft.DotNet.ApiCompatibility (2)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Packaging (153)
PackageIndex.cs (62)
195var assemblyVersion = VersionUtility.GetAssemblyVersion(file);
221Version supportedVersion = (versionAttribute != null) ? new Version(versionAttribute.Value) : VersionUtility.MaxVersion;
227private void TryAddInbox(string assemblyName, NuGetFramework framework, Version version, bool addPackages = true)
242public bool TryGetBaseLineVersion(string packageId, out Version baseLineVersion)
276Version assemblyVersion = FrameworkUtilities.Ensure4PartVersion(assemblyVersionString);
281public IEnumerable<NuGetFramework> GetInboxFrameworks(string assemblyName, Version assemblyVersion)
296Version assemblyVersion = FrameworkUtilities.Ensure4PartVersion(assemblyVersionString);
301public bool IsInbox(string assemblyName, NuGetFramework framework, Version assemblyVersion)
314public bool IsStable(string packageId, Version packageVersion)
345public Version GetPackageVersionForAssemblyVersion(string packageId, Version assemblyVersion)
348Version packageVersion = null;
369public HashSet<Version> StableVersions { get; set; } = new HashSet<Version>();
376public Version BaselineVersion { get; set; }
388public SortedDictionary<Version, Version> AssemblyVersionInPackageVersion { get; set; } = new SortedDictionary<Version, Version>();
415Version otherAssemblyVersion = assemblyVersionInPackage.Key;
416Version otherPackageVersion = assemblyVersionInPackage.Value;
422public void AddAssemblyVersionsInPackage(IEnumerable<Version> assemblyVersions, Version packageVersion)
424foreach (var assemblyVersion in assemblyVersions)
430public void AddAssemblyVersionInPackage(Version assemblyVersion, Version packageVersion)
432Version existingPackageVersion;
453public Version GetPackageVersionForAssemblyVersion(NuGetFramework framework, Version assemblyVersion)
455Version packageVersion = null;
470public Version GetPackageVersionForAssemblyVersion(Version assemblyVersion)
472Version packageVersion = null;
490private SortedDictionary<string, SortedDictionary<Version, Version>> inboxVersions = new SortedDictionary<string, SortedDictionary<Version, Version>>();
494public void AddInboxVersion(NuGetFramework framework, Version assemblyVersion)
498var frameworkVersion = normalizedFramework.Version;
500SortedDictionary<Version, Version> mappings;
503inboxVersions[frameworkKey] = mappings = new SortedDictionary<Version, Version>();
513List<Version> redundantMappings = new List<Version>();
518var existingFrameworkVersion = mapping.Key;
519var existingAssemblyVersion = mapping.Value;
544foreach(var redundantMapping in redundantMappings)
557foreach (var frameworkVersion in framework.Value.Keys)
566public IEnumerable<KeyValuePair<NuGetFramework, Version>> GetInboxVersions()
572var frameworkVersion = frameworkInboxVersionPair.Key;
573var assemblyVersion = frameworkInboxVersionPair.Value;
577yield return new KeyValuePair<NuGetFramework, Version>(fx, assemblyVersion);
587SortedDictionary<Version, Version> mappings;
597public bool IsInbox(NuGetFramework framework, Version assemblyVersion, bool permitRevisions = false)
602SortedDictionary<Version, Version> mappings;
609Version assemblyVersionInbox;
678private static NuGetFramework FromFrameworkKeyAndVersion(string key, Version version)
709var version = versionString.Equals(AnyVersion, StringComparison.OrdinalIgnoreCase) ? VersionUtility.MaxVersion : new Version(versionString);
729var assemblyVersion = frameworkPair.Value;
UpdatePackageIndex.cs (10)
138info.BaselineVersion = Version.Parse(version);
149info.StableVersions.Add(Version.Parse(version));
182var maxVersion = packageInfo.StableVersions.Max();
192IEnumerable<Version> stablePackageVersions = NuGetUtility.GetAllVersionsForPackageId(package.Key, includePrerelease: false, includeUnlisted: false, Log, CancellationToken.None);
230IEnumerable<Version> assemblyVersions;
263private void UpdateFromValues(PackageIndex index, string id, NuGetVersion version, IEnumerable<Version> assemblyVersions, IEnumerable<string> dllNames)
271IEnumerable<Version> allStableVersions = NuGetUtility.GetAllVersionsForPackageId(id, includePrerelease: false, includeUnlisted: false, Log, CancellationToken.None);
280var packageVersion = VersionUtility.As3PartVersion(version.Version);
287var assmVersions = new HashSet<Version>(assemblyVersions.NullAsEmpty().Where(v => v != null));
322foreach (var orphanedAssemblyVersion in orphanedAssemblyVersions.ToArray())
Microsoft.DotNet.Build.Tasks.Workloads (19)
Microsoft.DotNet.GenFacades (1)
Microsoft.DotNet.HotReload.Watch (16)
Microsoft.DotNet.PackageTesting (11)
Microsoft.DotNet.SdkResolver (9)
Microsoft.DotNet.SharedFramework.Sdk (20)
Microsoft.DotNet.TemplateLocator (13)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Identity.Core (5)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Maui.Essentials (9)
Microsoft.ML.TestFrameworkCommon (3)
Microsoft.NET.Build.Tasks (82)
ResolvePackageAssets.cs (11)
972private readonly Version _compilerVersion;
974private List<(string, LockFileLibrary, Version)> _potentialAnalyzers;
975private Version _maxApplicableVersion;
985if (ParseCompilerApiVersion(_cacheWriter._task.CompilerApiVersion, out ReadOnlyMemory<char> compilerName, out Version compilerVersion))
1000if (IsFileCompilerVersionSpecific(file, out Version fileCompilerVersion))
1008_potentialAnalyzers ??= new List<(string, LockFileLibrary, Version)>();
1024private bool IsFileCompilerVersionSpecific(string file, out Version fileCompilerVersion)
1081private static bool ParseCompilerApiVersion(string compilerApiVersion, out ReadOnlyMemory<char> compilerName, out Version compilerVersion)
1114private static bool TryParseVersion(string value, int startIndex, out Version version) =>
1117private static bool TryParseVersion(string value, int startIndex, int length, out Version version)
1120return Version.TryParse(value.AsSpan(startIndex, length), out version);
Microsoft.NET.HostModel (5)
Microsoft.NET.Sdk.Publish.Tasks (18)
Microsoft.NET.Sdk.Razor.Tasks (2)
Microsoft.NET.Sdk.WorkloadManifestReader (10)
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (2)
Microsoft.Private.Windows.Core (1)
Microsoft.SourceLink.Bitbucket.Git (6)
Microsoft.SourceLink.GitLab (4)
Microsoft.TemplateEngine.Core (6)
Microsoft.TestPlatform.CoreUtilities (5)
Microsoft.TestPlatform.Extensions.BlameDataCollector (2)
Microsoft.TestPlatform.TestHostRuntimeProvider (8)
Microsoft.VisualStudio.TestPlatform.ObjectModel (46)
Mono.Cecil (12)
mscorlib (1)
netstandard (1)
NuGet.Build.Tasks.Pack (10)
NuGet.CommandLine.XPlat (24)
_generated\5\PackageSearchJsonContext.NuGetFramework.g.cs (6)
74var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Version>
89AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null),
92properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Version>(options, info1);
116var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Version>
131AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("PlatformVersion", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null),
134properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Version>(options, info3);
_generated\8\PackageSearchJsonContext.LicenseMetadata.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Packaging.LicenseMetadata((global::NuGet.Packaging.LicenseType)args[0], (string)args[1], (global::NuGet.Packaging.Licenses.NuGetLicenseExpression)args[2], (global::System.Collections.Generic.IReadOnlyList<string>)args[3], (global::System.Version)args[4]),
35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::NuGet.Packaging.LicenseType), typeof(string), typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression), typeof(global::System.Collections.Generic.IReadOnlyList<string>), typeof(global::System.Version)}, modifiers: null),
134var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Version>
149AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null),
152properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Version>(options, info4);
251ParameterType = typeof(global::System.Version),
NuGet.Commands (5)
NuGet.Frameworks (49)
FrameworkConstants.cs (9)
10public static readonly Version EmptyVersion = new Version(0, 0, 0, 0);
11public static readonly Version MaxVersion = new Version(int.MaxValue, 0, 0, 0);
12public static readonly Version Version5 = new Version(5, 0, 0, 0);
13public static readonly Version Version6 = new Version(6, 0, 0, 0);
14public static readonly Version Version7 = new Version(7, 0, 0, 0);
15public static readonly Version Version8 = new Version(8, 0, 0, 0);
16public static readonly Version Version9 = new Version(9, 0, 0, 0);
17public static readonly Version Version10 = new Version(10, 0, 0, 0);
18public static readonly Version Version11 = new Version(11, 0, 0, 0);
NuGetFramework.cs (13)
18private readonly Version _frameworkVersion;
34public NuGetFramework(string framework, Version version)
44public NuGetFramework(string frameworkIdentifier, Version frameworkVersion, string? frameworkProfile)
52public NuGetFramework(string frameworkIdentifier, Version frameworkVersion, string platform, Version platformVersion)
57internal NuGetFramework(string frameworkIdentifier, Version frameworkVersion, string profile, string platform, Version platformVersion)
81public Version Version => _frameworkVersion;
91public Version PlatformVersion { get; }
298private static string GetDisplayVersion(Version version)
468private static Version NormalizeVersion(Version version)
470var normalized = version;
NuGetFrameworkFactory.cs (11)
77Version targetFrameworkVersion;
124Version platformVersion;
156ParseFrameworkNameParts(mappings, parts, out string? framework, out Version version, out string? profile);
172private static void ParseFrameworkNameParts(IFrameworkNameProvider mappings, string[] parts, out string framework, out Version version, out string? profile)
191version = Version.TryParse(versionString, out Version? parsedVersion)
217private static void ParsePlatformParts(string[] parts, out string targetPlatformIdentifier, out Version platformVersion)
231platformVersion = Version.TryParse(versionString, out Version? parsedVersion)
282var version = FrameworkConstants.EmptyVersion;
311Version? platformVersion = FrameworkConstants.EmptyVersion;
NuGet.PackageManagement (4)
NuGet.Packaging (18)
NuGet.Protocol (14)
NuGet.Versioning (15)
PresentationBuildTasks (6)
MS\Internal\MarkupCompiler\VersionHelper.cs (6)
16private static readonly Version NullVersion = new Version(0, 0, 0, 0);
24internal static bool TryParse(string s, out Version version)
41internal static bool TryParseAssemblyVersion(string s, bool allowWildcard, out Version version, out bool hasWildcard)
59private static bool TryParse(string s, bool allowWildcard, ushort maxValue, bool allowPartialParse, out Version version, out bool hasWildcard)
181public static Version? GenerateVersionFromPatternAndCurrentTime(DateTime time, Version pattern)
PresentationCore (4)
PresentationFramework (6)
RepoTasks (1)
Roslyn.Diagnostics.Analyzers (2)
rzc (1)
sdk-tasks (1)
Shared.Tests (2)
System.ComponentModel.TypeConverter (11)
System\ComponentModel\VersionConverter.cs (10)
24return sourceType == typeof(string) || sourceType == typeof(Version) || base.CanConvertFrom(context, sourceType);
33return destinationType == typeof(Version) || destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);
46return Version.Parse(versionString);
50throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, versionString, nameof(Version)), e);
54if (value is Version version)
70if (value is Version version)
74ConstructorInfo? ctor = typeof(Version).GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) }, null);
84if (destinationType == typeof(Version))
97return Version.TryParse(version, out _);
99return value is Version;
System.Configuration.ConfigurationManager (5)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.FileVersionInfo (1)
System.Net.Http (15)
System.Net.Http.WinHttpHandler (5)
System.Net.HttpListener (5)
System.Net.Primitives (10)
System.Net.Quic (3)
System.Net.Requests (3)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (67)
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (2)
13public static unsafe string ComputeDisplayName(string name, Version? version, string? cultureName, byte[]? pkt, AssemblyNameFlags flags = 0, AssemblyContentType contentType = 0, byte[]? pk = null)
20public static void AppendDisplayName(ref ValueStringBuilder vsb, string name, Version? version, string? cultureName, byte[]? pkt, AssemblyNameFlags flags = 0, AssemblyContentType contentType = 0, byte[]? pk = null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (33)
23public sealed class Version : ICloneable, IComparable, IComparable<Version?>, IEquatable<Version?>, ISpanFormattable, IUtf8SpanFormattable, IUtf8SpanParsable<Version>
69Version v = Parse(version);
84private Version(Version version)
119if (version is Version v)
127public int CompareTo(Version? value)
141return Equals(obj as Version);
144public bool Equals([NotNullWhen(true)] Version? obj)
284public static Version Parse(string input)
291public static Version Parse(ReadOnlySpan<char> input) =>
295static Version IUtf8SpanParsable<Version>.Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider)
297Version? result = ParseVersion(utf8Text, throwOnFailure: false);
315public static Version Parse(ReadOnlySpan<byte> utf8Text) =>
318public static bool TryParse([NotNullWhen(true)] string? input, [NotNullWhen(true)] out Version? result)
330public static bool TryParse(ReadOnlySpan<char> input, [NotNullWhen(true)] out Version? result)
345public static bool TryParse(ReadOnlySpan<byte> utf8Text, [NotNullWhen(true)] out Version? result)
352static bool IUtf8SpanParsable<Version>.TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [NotNullWhen(true)] out Version? result)
358private static Version? ParseVersion<TChar>(ReadOnlySpan<TChar> input, bool throwOnFailure)
466public static bool operator ==(Version? v1, Version? v2)
479public static bool operator !=(Version? v1, Version? v2) => !(v1 == v2);
481public static bool operator <(Version? v1, Version? v2)
491public static bool operator <=(Version? v1, Version? v2)
501public static bool operator >(Version? v1, Version? v2) => v2 < v1;
503public static bool operator >=(Version? v1, Version? v2) => v2 <= v1;
System.Private.CoreLib.Generators (1)
System.Private.TypeLoader (2)
System.Private.Xml (2)
System.Reflection.Context (2)
System.Reflection.Emit (1)
System.Reflection.Metadata (21)
System.Reflection.MetadataLoadContext (8)
System.Runtime (1)
System.Security.Cryptography (1)
System.Security.Permissions (7)
System.Text.Json (12)
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (8)
11internal sealed class VersionConverter : JsonPrimitiveConverter<Version?>
17public override Version? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
32private static unsafe Version ReadCore(ref Utf8JsonReader reader)
57if (Version.TryParse(utf8Source, out Version? result))
99public override unsafe void Write(Utf8JsonWriter writer, Version? value, JsonSerializerOptions options)
117internal override Version ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
122internal override unsafe void WriteAsPropertyNameCore(Utf8JsonWriter writer, Version value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System.Text.Json.SourceGeneration (1)
System.Windows.Forms (9)
System.Xaml (2)