4 writes to Version
dotnet (1)
ToolPackage\ToolPackageDownloader.cs (1)
160
Version
= version,
NuGet.Commands (2)
RestoreCommand\Utility\LockFileUtils.cs (2)
186
Version
= library.Version,
516
Version
= library.Version,
NuGet.ProjectModel (1)
LockFile\Utf8JsonStreamLockFileTargetLibraryConverter.cs (1)
85
lockFileTargetLibrary.
Version
= version is null ? null : NuGetVersion.Parse(version);
66 references to Version
aspire-managed (1)
NuGet\Commands\LayoutCommand.cs (1)
131
var libraryVersion = library.
Version
?.ToString() ?? string.Empty;
dotnet (5)
CommandFactory\CommandResolution\LockFileTargetExtensions.cs (1)
91
if (library.
Version
.Equals(dependency.VersionRange.MinVersion))
ToolPackage\ToolPackageInstance.cs (4)
92
ResolvedPackageVersion = library.
Version
;
157
library.
Version
.ToNormalizedString().ToLowerInvariant())
181
var installPath = new VersionFolderPathResolver(packageDirectory.Value).GetInstallPath(library.Name, library.
Version
);
228
library.
Version
.ToNormalizedString().ToLowerInvariant())
dotnet-svcutil-lib (1)
Shared\MSBuildProj.cs (1)
823
var dependency = ProjectDependency.FromPackage(Path.GetFileNameWithoutExtension(compiletimeAssembly.Path), lib.Name, lib.
Version
.ToNormalizedString());
Microsoft.DotNet.Cli.Utils (1)
Extensions\LockFileExtensions.cs (1)
20
.GetPackageDirectory(library.Name!, library.
Version
!)!;
Microsoft.NET.Build.Tasks (24)
AssetsFileResolver.cs (2)
42
var targetLibraryPackage = new PackageIdentity(targetLibrary.Name, targetLibrary.
Version
);
45
string libraryPath = _packageResolver.GetPackageDirectory(targetLibrary.Name, targetLibrary.
Version
, out pkgRoot);
DependencyContextBuilder.cs (1)
61
var dependencyLibrary = new DependencyLibrary(lockFileTargetLibrary.Name, lockFileTargetLibrary.
Version
, lockFileTargetLibrary.Type);
GenerateRuntimeConfigurationFiles.cs (1)
206
Version = lockFilePlatformLibrary.
Version
.ToNormalizedString()
LockFileExtensions.cs (3)
183
exclusionList.Add(new PackageIdentity(package.Name, package.
Version
));
211
if (library.
Version
.Equals(dependency.VersionRange.MinVersion))
213
if (exclusionList.Add(new PackageIdentity(library.Name, library.
Version
)))
LockFileLookup.cs (1)
64
library = GetPackage(targetLibrary.Name, targetLibrary.
Version
);
NuGetPackageResolver.cs (2)
46
string packagePath = GetPackageDirectory(package.Name, package.
Version
);
51
string.Format(Strings.PackageNotFound, package.Name, package.
Version
));
ProjectContext.cs (1)
298
if (dependency.
Version
.Equals(library.Version))
ResolvePackageAssets.cs (8)
979
_cacheWriter._compileTimeTarget.Libraries.ToDictionary(l => (l.Name, l.
Version
), new LibraryComparer());
1336
var restoredVersion = restoredPackage.
Version
.ToNormalizedString();
1525
static string GetPackageId(LockFileTargetLibrary package) => $"{package.Name}/{package.
Version
.ToNormalizedString()}";
1654
_task.Log.LogWarning(Strings.PackageContainsIncorrectlyCasedLocale, package.Name, package.
Version
.ToNormalizedString(), locale, normalizedLocale);
1661
_task.Log.LogMessage(MessageImportance.Low, Strings.PackageContainsIncorrectlyCasedLocale, package.Name, package.
Version
.ToNormalizedString(), locale, normalizedLocale);
1671
_task.Log.LogWarning(Strings.PackageContainsUnknownLocale, package.Name, package.
Version
.ToNormalizedString(), cnf.InvalidCultureName);
1678
_task.Log.LogMessage(MessageImportance.Low, Strings.PackageContainsUnknownLocale, package.Name, package.
Version
.ToNormalizedString(), cnf.InvalidCultureName);
1830
WriteMetadata(MetadataKeys.NuGetPackageVersion, package.
Version
.ToNormalizedString());
ResolvePackageDependencies.cs (5)
300
.ToDictionary(pkg => pkg.Name, pkg => pkg.
Version
.ToNormalizedString(), StringComparer.OrdinalIgnoreCase);
312
string packageId = $"{package.Name}/{package.
Version
.ToNormalizedString()}";
337
string packageId = $"{package.Name}/{package.
Version
.ToNormalizedString()}";
363
string packageId = $"{package.Name}/{package.
Version
.ToNormalizedString()}";
391
item.SetMetadata(MetadataKeys.NuGetPackageVersion, package.
Version
.ToNormalizedString());
NuGet.Build.Tasks.Pack (4)
PackTaskLogic.cs (4)
954
.ToLookup(library => new PackageIdentity(library.Name, library.
Version
));
969
var versionToUse = new VersionRange(targetLibrary.
Version
);
1115
minVersion: package.
Version
,
1123
minVersion: package.
Version
,
NuGet.CommandLine.XPlat (7)
Commands\Package\Update\PackageUpdateCommandRunner.cs (2)
181
.Where(tuple => tuple.library.Type == "package" && packageIdsWithVulnerabilities.Contains(tuple.library.Name!) && PackageHasVulnerability(tuple.library.Name!, tuple.library.
Version
!, knownVulnerabilities))
183
pair => new PackageIdentity(pair.library.Name!, pair.library.
Version
),
Commands\Why\DependencyGraphFinder.cs (2)
153
library.
Version
!,
189
NuGetVersion resolvedVersion = library.
Version
!;
Utility\MSBuildAPIUtility.cs (3)
812
var resolvedVersion = library.
Version
.ToString();
843
.FromIdentity(new PackageIdentity(library.Name, library.
Version
))
860
.FromIdentity(new PackageIdentity(library.Name, library.
Version
))
NuGet.Commands (15)
PackagesLockFileBuilder.cs (3)
48
var identity = new PackageIdentity(library.Name!, library.
Version
);
53
ResolvedVersion = library.
Version
,
95
var projectIdentity = new PackageIdentity(projectReference.Name!, projectReference.
Version
);
RestoreCommand\CompatibilityChecker.cs (1)
382
if (library.Name.Equals(libraryId.Name, StringComparison.OrdinalIgnoreCase) && library.
Version
.Equals(libraryId.Version))
RestoreCommand\LockFileBuilder.cs (7)
687
/// An <see cref="IEqualityComparer{T}" /> that compares <see cref="LockFileTargetLibrary" /> objects by the value of the <see cref="LockFileTargetLibrary.Name" /> and <see cref="LockFileTargetLibrary.
Version
" /> properties.
704
/// Determines whether the specified <see cref="LockFileTargetLibrary" /> objects are equal by comparing their <see cref="LockFileTargetLibrary.Name" /> and <see cref="LockFileTargetLibrary.
Version
" /> properties.
708
/// <returns><see langword="true" /> if the specified <see cref="LockFileTargetLibrary" /> objects' <see cref="LockFileTargetLibrary.Name" /> and <see cref="LockFileTargetLibrary.
Version
" /> properties are equal, otherwise <see langword="false" />.</returns>
711
return string.Equals(x.Name, y.Name, StringComparison.Ordinal) && x.
Version
.Equals(y.
Version
);
718
/// <returns>A hash code for the specified <see cref="LockFileTargetLibrary" /> object's <see cref="LockFileTargetLibrary.Name" /> and and <see cref="LockFileTargetLibrary.
Version
" /> properties.</returns>
724
combiner.AddObject(obj.
Version
);
RestoreCommand\RestoreCommand.cs (1)
1536
var version = lockFileLibrary.
Version
;
RestoreCommand\Utility\BuildAssetsUtils.cs (2)
530
if (sortedPkg.Id.Equals(assetsPkg.Name, StringComparison.OrdinalIgnoreCase) && sortedPkg.Version == assetsPkg.
Version
)
762
var packageVersion = currentItems[0].Item1.
Version
.ToNormalizedString();
RestoreCommand\Utility\NoOpRestoreUtilities.cs (1)
71
var version = lockFileLibrary.
Version
;
NuGet.PackageManagement (4)
BuildIntegration\BuildIntegratedRestoreUtility.cs (2)
79
.Select(library => new PackageIdentity(library.Name, library.
Version
));
93
.Select(library => new PackageIdentity(library.Name, library.
Version
));
Utility\BuildIntegratedProjectUtility.cs (2)
99
var identity = new PackageIdentity(targetLibrary.Name, targetLibrary.
Version
);
107
targetLibrary.
Version
,
NuGet.ProjectModel (4)
LockFile\LockFileFormat.cs (1)
376
writer.WritePropertyName(library.Name + "/" + library.
Version
.ToNormalizedString());
LockFile\LockFileTargetLibrary.cs (3)
174
&& VersionComparer.Default.Equals(
Version
!, other.
Version
!)
215
combiner.AddObject(
Version
);