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