1 write to Path
NuGet.ProjectModel (1)
LockFile\LockFileItem.cs (1)
19
Path
= path;
102 references to Path
aspire-managed (4)
NuGet\Commands\LayoutCommand.cs (4)
106
var packagesPath = lockFile.PackageFolders.FirstOrDefault()?.
Path
;
149
if (runtimeAssembly.
Path
.EndsWith("_._", StringComparison.OrdinalIgnoreCase))
154
var sourcePath = Path.Combine(packagePath, runtimeAssembly.
Path
.Replace('/', Path.DirectorySeparatorChar));
200
var sourcePath = Path.Combine(packagePath, nativeLib.
Path
.Replace('/', Path.DirectorySeparatorChar));
dotnet (12)
CommandFactory\CommandResolution\NuGetUtils.cs (1)
20
return files.Where(f => !IsPlaceholderFile(f.
Path
));
CommandFactory\CommandResolution\PackagedCommandSpecFactory.cs (2)
39
.FirstOrDefault(r => Path.GetFileNameWithoutExtension(r.
Path
) == commandName);
87
PathUtility.GetPathWithDirectorySeparator(runtimeAssembly.
Path
));
CommandFactory\CommandResolution\ProjectDependenciesCommandResolver.cs (1)
141
l.RuntimeAssemblies.Any(r => Path.GetFileNameWithoutExtension(r.
Path
) == commandName)).ToList();
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (2)
208
return lockFile.PackageFolders.Select((packageFolder) => packageFolder.
Path
);
353
string? buildRelativePath = platformLibrary.Build.FirstOrDefault()?.
Path
;
ToolPackage\LockFileMatchChecker.cs (2)
22
string[] pathInLockFilePathInArray = SplitPathByDirectorySeparator(lockFileItem.
Path
);
40
string[] pathInLockFilePathInArray = SplitPathByDirectorySeparator(lockFileItem.
Path
);
ToolPackage\ToolPackageInstance.cs (4)
121
LockFileRelativePathToFullFilePath(entryPointFromLockFile.
Path
, library));
134
.Select(f => f.
Path
.Split('\\', '/')?[4]) // ex: "tools/netcoreapp2.1/any/shims/osx-x64/demo" osx-x64 is at [4]
143
.Select(l => LockFileRelativePathToFullFilePath(l.
Path
, library)).ToArray() ?? [];
229
.WithFile(dotnetToolSettings.
Path
);
dotnet-svcutil-lib (2)
Shared\MSBuildProj.cs (2)
821
if (Path.GetExtension(compiletimeAssembly.
Path
) == ".dll")
823
var dependency = ProjectDependency.FromPackage(Path.GetFileNameWithoutExtension(compiletimeAssembly.
Path
), lib.Name, lib.Version.ToNormalizedString());
Microsoft.DotNet.Cli.Utils (1)
Extensions\LockFileExtensions.cs (1)
28
PathUtility.EnsureNoTrailingDirectorySeparator(p.
Path
));
Microsoft.NET.Build.Tasks (20)
AssetsFileResolver.cs (4)
57
string sourcePath = Path.Combine(libraryPath, runtimeTarget.
Path
);
76
string sourcePath = Path.Combine(libraryPath, resourceAssembly.
Path
);
98
string srcpath = Path.Combine(libraryPath, item.
Path
);
112
return Path.GetDirectoryName(runtimeTarget.
Path
) + Path.DirectorySeparatorChar;
FileGroup.cs (1)
91
=> fileItemList.Select(c => Tuple.Create(c.
Path
, c.Properties));
GenerateRuntimeConfigurationFiles.cs (1)
376
runtimeOptions.AdditionalProbingPaths.Add(EnsureNoTrailingDirectorySeparator(packageFolder.
Path
));
GetPackageDirectory.cs (1)
37
PackageFolders = PackageFolders.Concat(lockFile.PackageFolders.Select(p => p.
Path
)).ToArray();
LockFileExtensions.cs (1)
262
=> NuGetUtils.IsPlaceholderFile(item.
Path
);
NuGetPackageResolver.cs (1)
61
=> CreateResolver(lockFile.PackageFolders.Select(f => f.
Path
));
ResolvePackageAssets.cs (11)
1199
string itemSpec = _packageResolver.ResolvePackageAssetPath(library, asset.
Path
);
1365
WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.
Path
));
1434
WriteItem(packageFolder.
Path
);
1688
Path.GetFileName(asset.
Path
),
1706
WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.
Path
));
1723
Path.GetFileName(asset.
Path
),
1724
destinationSubDirectory: Path.GetDirectoryName(asset.
Path
) + Path.DirectorySeparatorChar);
1728
WriteMetadata(MetadataKeys.DestinationSubDirectory, Path.GetDirectoryName(asset.
Path
) + Path.DirectorySeparatorChar);
1810
string itemSpec = _packageResolver.ResolvePackageAssetPath(library, asset.
Path
);
1812
WriteMetadata(MetadataKeys.PathInPackage, asset.
Path
);
2026
var resolvedPackageAssetPath = _packageResolver.ResolvePackageAssetPath(library, asset.
Path
);
NuGet.Commands (38)
RestoreCommand\CompatibilityChecker.cs (4)
163
.Where(p => Path.GetExtension(p.
Path
)
166
var name = Path.GetFileNameWithoutExtension(compile.
Path
);
178
.Where(p => Path.GetExtension(p.
Path
)
181
var name = Path.GetFileNameWithoutExtension(runtime.
Path
);
RestoreCommand\ContentFiles\ContentFileUtils.cs (5)
207
var isPP = lockFileItem.
Path
.EndsWith(".pp", StringComparison.OrdinalIgnoreCase)
208
&& !string.IsNullOrEmpty(Path.GetFileNameWithoutExtension(lockFileItem.
Path
));
216
destination = Path.GetFileName(lockFileItem.
Path
);
238
lockFileItem.
Path
.AsSpan().Slice(0, lockFileItem.
Path
.Length - 3));
RestoreCommand\Utility\BuildAssetsUtils.cs (7)
283
item.
Path
.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries)
621
lockContentFiles.Sort(static (x, y) => StringComparer.Ordinal.Compare(x.
Path
, y.
Path
));
784
items: group.Where(e => !e.Item2.
Path
.EndsWith(PackagingCoreConstants.ForwardSlashEmptyFolder, StringComparison.Ordinal)
785
&& !e.Item2.
Path
.EndsWith(".pp", StringComparison.OrdinalIgnoreCase)) // Skip .pp files
826
return Path.Combine(package.Value.Package.ExpandedPath, LockFileUtils.ToDirectorySeparator(item.
Path
));
848
if (extension.Equals(Path.GetExtension(item.
Path
), StringComparison.OrdinalIgnoreCase))
RestoreCommand\Utility\LockFileUtils.cs (22)
282
if (Path.GetFileName(btItem.
Path
).Equals(Path.GetFileName(buildItem.
Path
), StringComparison.OrdinalIgnoreCase))
420
lockFileLib.RuntimeAssemblies = lockFileLib.RuntimeAssemblies.Where(p => !p.
Path
.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.
Path
))).ToList();
421
lockFileLib.CompileTimeAssemblies = lockFileLib.CompileTimeAssemblies.Where(p => !p.
Path
.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.
Path
))).ToList();
657
var diskPath = fileLookup[item.
Path
].AbsolutePath;
741
var ordered = items.OrderBy(c => c.
Path
, StringComparer.OrdinalIgnoreCase)
746
Path.GetFileName(c.
Path
),
757
Path.GetFileName(c.
Path
),
771
c.
Path
.EndsWith(PackagingCoreConstants.ForwardSlashEmptyFolder, StringComparison.Ordinal));
843
var firstItem = group.OrderBy(item => item.
Path
.LastIndexOf('/'))
844
.ThenBy(item => item.
Path
, StringComparer.OrdinalIgnoreCase)
847
var fileName = Path.GetFileName(firstItem.
Path
);
851
Debug.Assert(firstItem.
Path
.IndexOf('/', StringComparison.Ordinal) > 0);
856
var emptyDir = firstItem.
Path
.Substring(0, firstItem.
Path
.Length - fileName.Length)
879
return group?.Any(item => !item.
Path
.EndsWith(PackagingCoreConstants.ForwardSlashEmptyFolder, StringComparison.Ordinal)) == true;
1072
if (!lockFileLib.Build.Any(item => item.
Path
.StartsWith("buildTransitive/", StringComparison.OrdinalIgnoreCase)))
1087
if (!currentBuildItem.
Path
.StartsWith("build/", StringComparison.OrdinalIgnoreCase))
1095
item => Path.GetFileName(item.
Path
).Equals(Path.GetFileName(currentBuildItem.
Path
), StringComparison.OrdinalIgnoreCase));
NuGet.ProjectModel (25)
LockFile\LockFileFormat.cs (11)
410
var ordered = library.CompileTimeAssemblies.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
418
var ordered = library.RuntimeAssemblies.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
434
var ordered = library.ResourceAssemblies.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
442
var ordered = library.NativeLibraries.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
450
var ordered = library.ContentFiles.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
458
var ordered = library.Build.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
466
var ordered = library.BuildMultiTargeting.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
474
var ordered = library.RuntimeTargets.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
482
var ordered = library.ToolsAssemblies.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
490
var ordered = library.EmbedAssemblies.OrderBy(assembly => assembly.
Path
, StringComparer.Ordinal);
507
writer.WritePropertyName(item.
Path
);
LockFile\LockFileItem.cs (4)
41
public override string ToString() =>
Path
;
55
if (string.Equals(
Path
, other.
Path
, StringComparison.OrdinalIgnoreCase))
83
combiner.AddStringIgnoreCase(
Path
);
LockFile\LockFileTargetLibrary.cs (10)
180
&& IsListOrderedEqual<LockFileItem>(RuntimeAssembliesKey, static o => o.
Path
)
181
&& IsListOrderedEqual<LockFileItem>(ResourceAssembliesKey, static o => o.
Path
)
182
&& IsListOrderedEqual<LockFileItem>(CompileTimeAssembliesKey, static o => o.
Path
)
183
&& IsListOrderedEqual<LockFileItem>(NativeLibrariesKey, static o => o.
Path
)
184
&& IsListOrderedEqual<LockFileContentFile>(ContentFilesKey, static o => o.
Path
)
185
&& IsListOrderedEqual<LockFileRuntimeTarget>(RuntimeTargetsKey, static o => o.
Path
)
186
&& IsListOrderedEqual<LockFileItem>(BuildKey, static o => o.
Path
)
187
&& IsListOrderedEqual<LockFileItem>(BuildMultiTargetingKey, static o => o.
Path
)
188
&& IsListOrderedEqual<LockFileItem>(ToolsAssembliesKey, static o => o.
Path
)
189
&& IsListOrderedEqual<LockFileItem>(EmbedAssembliesKey, static o => o.
Path
);