114 references to Version
dotnet (14)
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (1)
124
project.DotnetCliToolTargetFramework.
Version
>= new Version(2, 0, 0))
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (2)
242
.Where(f => f.
Version
< new NuGetVersion(Product.Version).Version)
243
.MaxBy(f => f.
Version
);
ShellShim\ShellShimTemplateFinder.cs (2)
31
(targetFramework.
Version
.Major < 6 && OperatingSystem.IsMacOS() ||
32
targetFramework.
Version
.Major < 5 && OperatingSystem.IsWindows())
ToolPackage\ToolPackageInstance.cs (9)
196
var minRequiredFramework = availableFrameworks.MinBy(f => f.
Version
);
199
if (minRequiredFramework != null && minRequiredFramework.
Version
> currentFramework.
Version
)
201
var requiredVersionString = $".NET {minRequiredFramework.
Version
.Major}.{minRequiredFramework.
Version
.Minor}";
202
var currentVersionString = $".NET {currentFramework.
Version
.Major}.{currentFramework.
Version
.Minor}";
212
minRequiredFramework.
Version
.Major,
213
currentFramework.
Version
.Major);
Microsoft.DotNet.Build.Tasks.Packaging (22)
GeneratePackageReport.cs (2)
264
if (derivedFx.
Version
.Major == 0 && derivedFx.
Version
.Minor == 0)
GetMinimumNETStandard.cs (1)
33
.OrderBy(fx => fx.
Version
)
PackageIndex.cs (6)
498
var frameworkVersion = normalizedFramework.
Version
;
509
mappings[normalizedFramework.
Version
] = assemblyVersion;
541
mappings[normalizedFramework.
Version
] = assemblyVersion;
594
return mappings.Keys.Any(fxVer => fxVer <= framework.
Version
);
610
if (mappings.TryGetValue(normalizedFramework.
Version
, out assemblyVersionInbox))
630
var compatibleMapping = mappings.LastOrDefault(m => m.Key < normalizedFramework.
Version
);
SplitDependenciesBySupport.cs (3)
46
.OrderBy(fx => fx.
Version
)
54
d.TargetFramework.
Version
<= netStandardGroup.
Version
);
ValidatePackage.cs (10)
145
.Where(fx => fx != null && fx.Framework == _generationIdentifier && fx.
Version
!= null)
146
.Select(fx => fx.
Version
);
150
var allSupportedGenerations = _frameworks.Values.Where(vf => vf.SupportedVersion != null && FrameworkUtilities.IsGenerationMoniker(vf.Framework) && vf.Framework.
Version
!= null)
151
.Select(vf => vf.Framework.
Version
);
162
if (compileAsset.TargetFramework.
Version
< minSupportedGeneration)
164
Log.LogError($"Invalid generation {compileAsset.TargetFramework.
Version
} for {compileAsset.LocalPath}, must be at least {minSupportedGeneration} based on the implementations in the package. If you meant to target the lower generation you may be missing an implementation for a framework on that lower generation. If not you should raise the generation of the reference assembly to match that of the lowest supported generation of all implementations/placeholders.");
561
IEnumerable<ValidationFramework> higherFrameworks = _frameworks.Values.Where(vf => vf.Framework.Framework == fx.Framework && vf.Framework.
Version
> fx.
Version
).OrderBy(vf => vf.Framework.
Version
);
566
var uapFrameworks = _frameworks.Values.Where(vf => vf.Framework.Framework == FrameworkConstants.FrameworkIdentifiers.UAP).OrderBy(vf => vf.Framework.
Version
);
Microsoft.DotNet.PackageTesting (1)
GetCompatiblePackageTargetFrameworks.cs (1)
36
.OrderBy(t => t.
Version
)
Microsoft.DotNet.PackageValidation (1)
Validators\CompatibleFrameworkInPackageValidator.cs (1)
40
foreach (NuGetFramework framework in options.Package.FrameworksInPackage.OrderByDescending(f => f.
Version
))
Microsoft.NET.Build.Tasks (12)
FrameworkPackages\FrameworkPackages.cs (2)
131
var packVersionPattern = $"{framework.
Version
.Major}.{framework.
Version
.Minor}.*";
GenerateSupportedTargetFrameworkAlias.cs (2)
33
if (!(targetFramework.Framework.Equals(".NETCoreApp") && targetFramework.
Version
>= new Version(5, 0)) || UseWpf || UseWindowsForms)
46
if ((UseWindowsForms || UseWpf) && currentTargetFramework.Framework.Equals(".NETCoreApp") && currentTargetFramework.
Version
>= new Version(5, 0))
ProcessFrameworkReferences.cs (3)
611
|| NormalizeVersion(knownFrameworkReferenceTargetFramework.
Version
) != _normalizedTargetFrameworkVersion)
630
|| NormalizeVersion(knownFrameworkReferenceTargetFramework.
Version
) != _normalizedTargetFrameworkVersion)
818
NormalizeVersion(packTargetFramework.
Version
) == normalizedTargetFrameworkVersion;
ResolveAppHosts.cs (1)
90
ProcessFrameworkReferences.NormalizeVersion(packTargetFramework.
Version
) == normalizedTargetFrameworkVersion;
ResolvePackageAssets.cs (3)
1420
if (targetFramework.
Version
.Major >= 3
1652
if (tfm.
Version
.Major >= 7)
1669
if (tfm.
Version
.Major >= 7)
ResolvePackageDependencies.cs (1)
287
item.SetMetadata(MetadataKeys.FrameworkVersion, target.TargetFramework.
Version
.ToString());
NuGet.CommandLine.XPlat (2)
_generated\5\PackageSearchJsonContext.NuGetFramework.g.cs (2)
79
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).
Version
,
395
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Frameworks.NuGetFramework)value).
Version
, Version);
NuGet.Commands (9)
RestoreCommand\DependencyGraphResolver.cs (1)
1413
return frameworkName.
Version
.Major >= 10;
RestoreCommand\MonoAndroidDeprecation.cs (1)
40
&& framework.
Version
.Major >= 11
RestoreCommand\RestoreCommand.cs (4)
427
bool isPruningCompatibleFramework = (isNetCoreAppFramework && framework.FrameworkName.
Version
.Major >= 2) ||
429
framework.FrameworkName.
Version
.Major >= 2);
431
pruningDefault |= isNetCoreAppFramework && framework.FrameworkName.
Version
.Major >= 10;
1028
framework.FrameworkName.
Version
.Major >= 10)
Utility\MSBuildProjectFrameworkUtility.cs (3)
282
framework = new NuGetFramework(framework.Framework, framework.
Version
, framework.Platform, cppCliVersion);
356
&& framework.
Version
.Equals(Version.Parse("4.5.1.0")))
363
&& framework.
Version
.Equals(Version.Parse("4.5.0.0")))
NuGet.Frameworks (47)
comparers\NuGetFrameworkFullComparer.cs (3)
32
return x.
Version
== y.
Version
50
combiner.AddObject(obj.
Version
);
comparers\NuGetFrameworkSorter.cs (2)
73
result = x.
Version
.CompareTo(y.
Version
);
CompatibilityListProvider.cs (2)
46
.Select(g => g.Aggregate((a, b) => a.
Version
< b.
Version
? a : b))
CompatibilityProvider.cs (4)
182
bool isNet6Era = target.IsNet5Era && target.
Version
.Major >= 6;
201
&& IsVersionCompatible(target.
Version
, candidate.
Version
)
215
&& target.
Version
.Major >= 10
FrameworkExpander.cs (1)
108
yield return new NuGetFramework(subFramework, framework.
Version
, framework.Profile);
FrameworkNameProvider.cs (5)
310
&& curFw.
Version
>= optional.
Version
)
593
result.Add(new NuGetFramework(fw.Framework, fw.
Version
, eqProfile));
1153
set.Add(new NuGetFramework(subFramework, framework.
Version
, framework.Profile));
1161
set.Add(new NuGetFramework(superFramework, framework.
Version
, framework.Profile));
FrameworkRange.cs (8)
82
&& (_includeMin ? Min.
Version
<= framework.
Version
: Min.
Version
< framework.
Version
)
83
&& (_includeMax ? Max.
Version
>= framework.
Version
: Max.
Version
> framework.
Version
);
FrameworkReducer.cs (13)
90
bool isNet6Era = framework.IsNet5Era && framework.
Version
.Major >= 6;
183
if (!isNet6Era || reduced.Any(f => NuGetFrameworkNameComparer.Instance.Equals(framework, f) && f.
Version
.Major >= 6))
186
reduced = reduced.Where(f => NuGetFrameworkNameComparer.Instance.Equals(framework, f)).GroupBy(f => f.
Version
).OrderByDescending(f => f.Key).First();
335
dupe = x.
Version
== FrameworkConstants.EmptyVersion && y.
Version
!= FrameworkConstants.EmptyVersion;
512
if (consideringFramework.
Version
< currentFramework.
Version
)
516
else if (currentFramework.
Version
< consideringFramework.
Version
)
541
if (currentNet.
Version
< consideringNet.
Version
)
545
else if (consideringNet.
Version
< currentNet.
Version
)
NuGetFramework.cs (8)
25
: this(framework.Framework, framework.
Version
, framework.Profile, framework.Platform, framework.PlatformVersion)
144
parts.Add(string.Format(CultureInfo.InvariantCulture, "Version=v{0}", GetDisplayVersion(framework.
Version
)));
229
sb.Append(mappings.GetVersionString(framework.Framework, framework.
Version
));
337
get { return StringComparer.OrdinalIgnoreCase.Equals(Framework, FrameworkConstants.FrameworkIdentifiers.Portable) &&
Version
.Major < 5; }
366
get { return
Version
.Major == 0 &&
Version
.Minor == 0 &&
Version
.Build == 0 &&
Version
.Revision == 0; }
NuGetFrameworkUtility.cs (1)
128
return (framework.
Version
.Major >= 5
NuGet.Packaging (3)
PackageCreation\Authoring\PhysicalPackageFile.cs (1)
54
if (NuGetFramework != null && NuGetFramework.
Version
.Major < 5)
PackageCreation\Extensions\FrameworksExtensions.cs (1)
16
bool isNet5Era = (self.
Version
.Major >= 5 && StringComparer.OrdinalIgnoreCase.Equals(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, self.Framework));
Rules\InvalidUndottedFrameworkRule.cs (1)
288
if (framework.
Version
.Major >= 5 &&
NuGet.ProjectModel (2)
ProjectLockFile\PackagesLockFileTarget.cs (2)
91
(framework.
Version
.Major >= 6)
92
|| (framework.
Version
.Major == 5 && framework.HasPlatform)
sdk-tasks (1)
OverrideAndCreateBundledNETCoreAppPackageVersion.cs (1)
47
.OrderByDescending(tf => tf.Parsed.
Version
)