28 references to VersionUtility
Microsoft.DotNet.Build.Tasks.Packaging (27)
GetLastStablePackage.cs (3)
110
stableVersion =
VersionUtility
.As4PartVersion(stableVersion);
145
var latestVersion = (DoNotAllowVersionsFromSameRelease) ?
VersionUtility
.As2PartVersion(nuGetVersion?.Version) : nuGetVersion?.Version;
150
IEnumerable<Version> candidateVersions = (latestVersion == null) ? info.StableVersions : info.StableVersions.Where(sv =>
VersionUtility
.As4PartVersion(sv) < latestVersion);
HarvestPackage.cs (2)
252
version =
VersionUtility
.GetAssemblyVersion(Path.Combine(packagePath, refAssm))?.ToString() ?? version;
344
var assemblyVersion = extension == s_dll ?
VersionUtility
.GetAssemblyVersion(packageFile) : null;
NuGetUtility.cs (2)
60
Version threePartVersion =
VersionUtility
.As3PartVersion(packageMetadata.Identity.Version.Version);
84
return versions.Where(v =>
VersionUtility
.As2PartVersion(v) == new Version(eraMajorVersion, eraMinorVersion))
PackageIndex.cs (11)
195
var assemblyVersion =
VersionUtility
.GetAssemblyVersion(file);
221
Version supportedVersion = (versionAttribute != null) ? new Version(versionAttribute.Value) :
VersionUtility
.MaxVersion;
359
packageVersion =
VersionUtility
.As3PartVersion(assemblyVersion);
463
packageVersion =
VersionUtility
.As3PartVersion(assemblyVersion);
480
packageVersion =
VersionUtility
.As3PartVersion(assemblyVersion);
618
if (assemblyVersionInbox ==
VersionUtility
.MaxVersion)
625
VersionUtility
.IsCompatibleApiVersion(assemblyVersionInbox, assemblyVersion) :
637
if (compatibleMapping.Value ==
VersionUtility
.MaxVersion)
644
VersionUtility
.IsCompatibleApiVersion(compatibleMapping.Value, assemblyVersion) :
709
var version = versionString.Equals(AnyVersion, StringComparison.OrdinalIgnoreCase) ?
VersionUtility
.MaxVersion : new Version(versionString);
730
var assemblyVersionString = assemblyVersion ==
VersionUtility
.MaxVersion ? AnyVersion : assemblyVersion.ToString();
PackageItem.cs (1)
78
_version =
VersionUtility
.GetAssemblyVersion(SourcePath);
UpdatePackageIndex.cs (3)
220
var assemblyVersions = dlls.Select(f =>
VersionUtility
.GetAssemblyVersion(f));
253
return
VersionUtility
.GetAssemblyVersion(memStream);
280
var packageVersion =
VersionUtility
.As3PartVersion(version.Version);
ValidatePackage.cs (5)
278
if (!
VersionUtility
.IsCompatibleApiVersion(supportedVersion, referenceAssemblyVersion))
307
if (!
VersionUtility
.IsCompatibleApiVersion(supportedVersion, implementationVersion))
316
!
VersionUtility
.IsCompatibleApiVersion(referenceAssemblyVersion, implementationVersion))
389
var assemblyVersions = new HashSet<Version>(allAssemblies.Select(f =>
VersionUtility
.As4PartVersion(f.Version)));
391
var thisPackageVersion =
VersionUtility
.As3PartVersion(NuGetVersion.Parse(PackageVersion).Version);
Microsoft.DotNet.Build.Tasks.Packaging.Tests (1)
VersionUtilityTests.cs (1)
32
bool isCompatible =
VersionUtility
.IsCompatibleApiVersion(referenceVersion, candidateVersion);