137 references to Version
Aspire.Cli.Tests (1)
Utils\ContainerRuntimeCheckTests.cs (1)
110Assert.Equal(new Version(20, 10), clientVersion);
dotnet (4)
Commands\New\BuiltInTemplatePackageProvider.cs (1)
97var majorMinorDirVersion = new Version(dirInfo.Value.Major, dirInfo.Value.Minor);
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
61private static readonly Version s_version6_0 = new(6, 0);
ToolPackage\ToolPackageDownloader.cs (1)
180currentTargetFramework = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(Environment.Version.Major, Environment.Version.Minor));
ToolPackage\ToolPackageInstance.cs (1)
193var currentFramework = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(Environment.Version.Major, Environment.Version.Minor));
dotnet-svcutil-lib (1)
Bootstrapper\SvcutilBootstrapper.cs (1)
127if (isSupportedTFM && frameworkInfo.Name != FrameworkInfo.Netstandard && frameworkInfo.Version.CompareTo(new Version(6, 0)) >= 0)
GenerateDocumentationAndConfigFiles (2)
Program.cs (1)
981var unshippedVersion = new Version(maxShippedVersion!.Major + 1, maxShippedVersion.Minor);
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (1)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
ILAssembler (1)
EntityRegistry.cs (1)
575?? GetOrCreateAssemblyReference("mscorlib", new Version(4, 0), culture: null, publicKeyOrToken: null, 0, ProcessorArchitecture.None);
ILCompiler.Compiler (3)
Compiler\Dataflow\CompilerGeneratedState.cs (1)
690generatedType.Module.Assembly is EcmaAssembly asm && asm.GetTargetFrameworkVersion() >= new Version(10, 0))
Compiler\MstatObjectDumper.cs (1)
49version: new Version(VersionMajor, VersionMinor));
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
142Version version = name.Version ?? new Version(0, 0);
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
142Version version = name.Version ?? new Version(0, 0);
illink (1)
ILLink.RoslynAnalyzer (1)
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
283versionNumbers[2] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1]) :
Microsoft.AspNetCore.Server.IISIntegration (1)
WebHostBuilderIISExtensions.cs (1)
51isWebSocketsSupported = (Environment.OSVersion.Version >= new Version(6, 2));
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Middleware\HttpsConnectionMiddleware.cs (2)
553if (Environment.OSVersion.Version < new Version(6, 3) // Missing ALPN support 555|| (Environment.OSVersion.Version < new Version(10, 0) && !enableHttp2OnWindows81))
Microsoft.Build (2)
Definition\Toolset.cs (1)
700Version visualStudioVersionFromSolutionAsVersion = new Version(visualStudioVersionFromSolution, 0);
Utilities\Utilities.cs (1)
377if (toolsVersionAsVersion > new Version(15, 0))
Microsoft.Build.Framework (29)
BackEnd\TranslatorHelpers.cs (1)
348version = new Version(major, minor);
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);
Loader\LoadedType.cs (1)
196Version lastVersionToForce = new Version(3, 5);
Utilities\FrameworkLocationHelper.cs (17)
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); 61internal static readonly Version dotNetFrameworkVersion46 = new Version(4, 6); 64internal static readonly Version dotNetFrameworkVersion47 = new Version(4, 7); 67internal static readonly Version dotNetFrameworkVersion48 = new Version(4, 8); 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 (5)
AssemblyDependency\AssemblyNameReferenceAscendingVersionComparer.cs (1)
17private static Version DummyVersion { get; } = new Version(0, 0);
ManifestUtil\ComImporter.cs (1)
69TypeLib = new TypeLib(tlbid, new Version(typeLibAttr.wMajorVerNum, typeLibAttr.wMinorVerNum), helpdir, typeLibAttr.lcid, Convert.ToInt32(typeLibAttr.wLibFlags, CultureInfo.InvariantCulture));
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (2)
392replacementVersion = new Version(candidateVersion.Major, candidateVersion.Minor); 446versionStrings.Add(new ExtensionFoldersRegistryKey(key, targetVersion ?? new Version(0, 0)));
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersFromConfig.cs (1)
90return new Version(candidateVersion.Major, candidateVersion.Minor);
Microsoft.Build.Utilities.Core (4)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (2)
392replacementVersion = new Version(candidateVersion.Major, candidateVersion.Minor); 446versionStrings.Add(new ExtensionFoldersRegistryKey(key, targetVersion ?? new Version(0, 0)));
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersFromConfig.cs (1)
90return new Version(candidateVersion.Major, candidateVersion.Minor);
ToolLocationHelper.cs (1)
2483extensionSdk = new TargetPlatformSDK(string.Empty, new Version(0, 0), null);
Microsoft.CodeAnalysis.Analyzers (1)
MetaAnalyzers\ReleaseTrackingHelper.cs (1)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
Microsoft.DotNet.Build.Tasks.Packaging (2)
NuGetUtility.cs (1)
86return versions.Where(v => VersionUtility.As2PartVersion(v) == new Version(eraMajorVersion, eraMinorVersion))
VersionUtility.cs (1)
88return new Version(version.Major, version.Minor);
Microsoft.DotNet.HotReload.Watch (3)
Utilities\Versions.cs (3)
8public static readonly Version Version3_1 = new(3, 1); 9public static readonly Version Version6_0 = new(6, 0); 10public static readonly Version Version11_0 = new(11, 0);
Microsoft.DotNet.TemplateLocator (1)
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
61private static readonly Version s_version6_0 = new(6, 0);
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\RequestMessageSnapshotTests.cs (1)
59Version = new Version(1, 1),
Microsoft.Extensions.Identity.Core (4)
IdentitySchemaVersions.cs (4)
16public static readonly Version Default = new Version(0, 0); 21public static readonly Version Version1 = new Version(1, 0); 26public static readonly Version Version2 = new Version(2, 0); 31public static readonly Version Version3 = new Version(3, 0);
Microsoft.Maui.Essentials (2)
Types\Shared\Utils.shared.cs (2)
16 return new Version(major, 0); 18 return new Version(0, 0);
Microsoft.ML.TestFramework (4)
Attributes\OnnxTheoryAttribute.cs (1)
24|| AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)))
Attributes\TensorflowFactAttribute.cs (1)
25AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))))
Attributes\TensorflowTheoryAttribute.cs (1)
25AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))))
Attributes\TorchSharpFactAttribute.cs (1)
30AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))));
Microsoft.ML.TestFrameworkCommon (1)
Attributes\OnnxFactAttribute.cs (1)
29|| AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)))
Microsoft.NET.Build.Tasks (7)
FrameworkPackages\FrameworkPackages.net9.0.cs (1)
18private static NuGetFramework Net90 { get; } = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(9, 0));
GenerateSupportedTargetFrameworkAlias.cs (2)
33if (!(targetFramework.Framework.Equals(".NETCoreApp") && targetFramework.Version >= new Version(5, 0)) || UseWpf || UseWindowsForms) 46if ((UseWindowsForms || UseWpf) && currentTargetFramework.Framework.Equals(".NETCoreApp") && currentTargetFramework.Version >= new Version(5, 0))
GetPackagesToPrune.cs (2)
319currentVersion = new Version(currentVersion.Major, currentVersion.Minor - 1); 325currentVersion = new Version(currentVersion.Major - 1, 0);
ProcessFrameworkReferences.cs (1)
1264return new Version(version.Major, version.Minor);
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
61private static readonly Version s_version6_0 = new(6, 0);
Microsoft.NET.HostModel (1)
ComHost\TypeLibReader.cs (1)
62version = new Version(majorVer, minorVer);
Microsoft.NET.Sdk.Publish.Tasks (3)
MsDeploy\CommonUtility.cs (2)
524Version minVersion = new(currentMinVersion.Major, currentMinVersion.Minor); 557new System.Version(3, 6),
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
61private static readonly Version s_version6_0 = new(6, 0);
Microsoft.NET.Sdk.Razor.Tasks (1)
SdkRazorGenerate.cs (1)
105parsedVersion = new System.Version(2, 1);
Microsoft.NET.Sdk.WorkloadManifestReader (1)
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
61private static readonly Version s_version6_0 = new(6, 0);
Microsoft.SourceLink.Bitbucket.Git (1)
GetSourceLinkUrl.cs (1)
25private static readonly Version s_versionWithNewUrlFormat = new Version(4, 7);
Microsoft.SourceLink.GitLab (1)
GetSourceLinkUrl.cs (1)
24private static readonly Version s_versionWithNewUrlFormat = new Version(12, 0);
Microsoft.TestPlatform.CoreUtilities (1)
Helpers\FileHelper.cs (1)
19private static readonly Version DefaultFileVersion = new(0, 0);
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\DotnetTestHostManager.cs (1)
521&& version < new Version(3, 0))
Microsoft.VisualStudio.TestPlatform.ObjectModel (9)
Nuget.Frameworks\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));
Nuget.Frameworks\FrameworkExpander.cs (1)
89new NuGetFramework(framework.Framework, new Version(0, 0), framework.Profile),
Nuget.Frameworks\NuGetFrameworkFactory.cs (2)
181version = new Version(0, 0); 223platformVersion = new Version(0, 0);
NuGet.Frameworks (9)
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));
FrameworkExpander.cs (1)
89new NuGetFramework(framework.Framework, new Version(0, 0), framework.Profile),
NuGetFrameworkFactory.cs (2)
178version = new Version(0, 0); 220platformVersion = new Version(0, 0);
NuGet.Packaging (1)
Core\PackageType.cs (1)
14public static readonly Version EmptyVersion = new Version(0, 0);
NuGet.Versioning (1)
FloatRange.cs (1)
227range = new FloatRange(NuGetVersionFloatBehavior.Major, new NuGetVersion(new Version(0, 0)));
PresentationFramework (3)
System\Windows\Standard\Utilities.cs (3)
77get { return _osVersion >= new Version(6, 0); } 81get { return _osVersion >= new Version(6, 1); } 87public static bool IsOSWindows8OrNewer => _osVersion >= new Version(6, 2);
System.Data.Common (2)
System\Data\DataSet.cs (1)
329info.AddValue("DataSet.RemotingVersion", new Version(2, 0));
System\Data\DataTable.cs (1)
243info.AddValue("DataTable.RemotingVersion", new Version(2, 0));
System.Management (1)
System\Management\InteropClasses\WMIInterop.cs (1)
1372if (os.Platform == PlatformID.Win32NT && os.Version >= new Version(5, 0))
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1084response.SetVersionWithoutValidation(new Version(1, minorVersion - '0'));
System.Net.Http.WinHttpHandler (3)
System\Net\Http\WinHttpHandler.cs (3)
43internal static readonly Version HttpVersion20 = new Version(2, 0); 44internal static readonly Version HttpVersion30 = new Version(3, 0); 45internal static readonly Version HttpVersionUnknown = new Version(0, 0);
System.Net.HttpListener (1)
System\Net\Managed\HttpListenerResponse.Managed.cs (1)
70_version = new Version(value.Major, value.Minor); // match Windows behavior, trimming to just Major.Minor
System.Net.Primitives (5)
System\Net\HttpVersion.cs (5)
9public static readonly Version Unknown = new Version(0, 0); 11public static readonly Version Version10 = new Version(1, 0); 13public static readonly Version Version11 = new Version(1, 1); 15public static readonly Version Version20 = new Version(2, 0); 17public static readonly Version Version30 = new Version(3, 0);
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicApi.cs (1)
67internal static bool SupportsAsyncCertValidation => Version > new Version(2, 4);
System.Net.Requests (1)
System\Net\ServicePoint\ServicePoint.cs (1)
69public virtual Version ProtocolVersion { get; internal set; } = new Version(1, 1);
System.Private.CoreLib (2)
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
283versionNumbers[2] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1]) :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
425new Version(major, minor) :
System.Reflection.Metadata (1)
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
283versionNumbers[2] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1]) :
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\General\Helpers.cs (2)
1620b0010 => new Version(v.Major, v.Minor), 1630b0011 => new Version(v.Major, v.Minor),