1051 references to GetFileName
aspire (44)
Acquisition\InstallationDiscovery.cs (2)
334!string.Equals(Path.GetFileName(dogfoodDir), InstallationDiscoveryLayout.DogfoodDirectoryName, StringComparison.Ordinal)) 339var label = Path.GetFileName(prDir);
Agents\AspireSkills\AspireSkillsInstaller.cs (4)
621var archiveSha512 = TryNormalizeArchiveSha512(Path.GetFileName(directory)); 986var version = Path.GetFileName(directory); 1031var directoryName = Path.GetFileName(bundleDirectory); 1133var safeName = Path.GetFileName(fileName);
Bundles\BundleService.cs (2)
643var name = Path.GetFileName(entry); 711return Path.GetFileName(path.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
Certificates\CertificateCacheWriter.cs (1)
22$".{Path.GetFileName(outputPath)}.{Guid.NewGuid():N}.tmp");
Commands\PipelineCommandBase.cs (4)
1258return ValidationResult.Error($"'{Path.GetFileName(fullPath)}' exceeds the maximum size of {FormatHelpers.FormatFileSize(maxSize)}."); 1264var fileName = Path.GetFileName(fullPath); 1270return ValidationResult.Error($"'{Path.GetFileName(fullPath)}' does not match the accepted file types ({input.FileFilter})."); 1336var fileName = Path.GetFileName(fullPath);
DotNet\DotNetCliRunner.cs (1)
1198.FirstOrDefault(path => string.Equals(Path.GetFileName(path), expectedFileName, StringComparison.OrdinalIgnoreCase));
Git\GitWorktree.cs (1)
385var entryName = Path.GetFileName(entry);
Layout\LayoutDiscovery.cs (3)
173var entries = Directory.GetFileSystemEntries(layoutPath).Select(Path.GetFileName).ToArray(); 264_logger.LogDebug(" {Dir}/{Dcp}/{Exe}: {Exists}", BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName, Path.GetFileName(bundleDcpExe), File.Exists(bundleDcpExe) ? "exists" : "MISSING"); 298_logger.LogDebug(" dcp/{DcpExe}: {Exists}", Path.GetFileName(dcpExePath), File.Exists(dcpExePath) ? "exists" : "MISSING");
Projects\AppHostServerClosureSnapshots.cs (1)
159FileName = Path.GetFileName(entry.RelativePath),
Projects\JavaAppHostToolchainResolver.cs (1)
703StampFile = Path.Combine(classesDirectory, Path.GetFileName(baseCompile.UpToDateCheck.StampFile))
Projects\ProjectLocator.cs (1)
1309if (string.Equals(Path.GetFileName(trimmedConfigDirectoryPath), ".aspire", StringComparison.OrdinalIgnoreCase) &&
Scaffolding\ScaffoldingService.cs (3)
364language.MatchesFile(Path.GetFileName(fileName))); 595=> Path.GetFileName(fileName).Equals(".gitignore", StringComparison.Ordinal); 598=> Path.GetFileName(fileName).Equals(PackageJsonFileName, StringComparison.OrdinalIgnoreCase);
src\Shared\BackchannelConstants.cs (4)
357var fileName = Path.GetFileName(socketPath); 392var fileName = Path.GetFileName(socketPath); 578var fileName = Path.GetFileName(f); 606var fileName = Path.GetFileName(f);
src\Shared\BundleVersionLease.cs (1)
118var versionId = Path.GetFileName(fullVersionDirectory.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
src\Shared\IntegrationPackageProbeManifest.cs (1)
220var normalizedFileName = Path.GetFileName(libraryName);
src\Shared\Model\ResourceSourceViewModel.cs (2)
17return new ResourceSource(Path.GetFileName(projectPath), projectPath); 30return new ResourceSource(Path.GetFileName(executablePath), executablePath);
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Telemetry\ProfilingTelemetry.cs (2)
786var executableName = Path.GetFileName(executablePath); 1033public void SetBackchannelSocketFile(string socketPath) => SetTag(Tags.BackchannelSocketFile, Path.GetFileName(socketPath));
Templating\CliTemplateFactory.cs (1)
358if (_environment.IsWindows() || !s_executableTemplateFileNames.Contains(Path.GetFileName(filePath)))
Templating\OutputPathHelper.cs (1)
147return string.Equals(Path.GetFileName(normalizedOutputPath), projectName, StringComparison.OrdinalIgnoreCase)
Utils\CliDownloader.cs (1)
110var fileName = Path.GetFileName(uri.AbsolutePath);
Utils\CliPathHelper.cs (1)
143!string.Equals(Path.GetFileName(dogfoodDir), InstallationDiscoveryLayout.DogfoodDirectoryName, StringComparison.Ordinal))
Utils\DotNetToolDetection.cs (3)
144if (!IsAspireExecutable(Path.GetFileName(processPath))) 169if (!IsAspireExecutable(Path.GetFileName(candidatePath))) 205if (string.Equals(Path.GetFileName(currentDirectory), ".store", StringComparison.OrdinalIgnoreCase))
Utils\EnvironmentChecker\VsCodeExtensionCheck.cs (1)
193if (IsVersionedExtensionFolder(Path.GetFileName(directory)))
Utils\ReparsePoint.cs (1)
299var name = Path.GetFileName(linkPath);
aspire-managed (9)
NuGet\Commands\ManifestCommand.cs (1)
151FileName = Path.GetFileName(asset.RelativePath),
NuGet\Commands\NuGetPackageAssetResolver.cs (5)
206var fileName = Path.GetFileName(sourcePath); 371: Path.GetFileName(Path.GetDirectoryName(resourceAssembly.Path)); 383Path.Combine(locale, Path.GetFileName(sourcePath)), 410AddAsset(assets, packageId, packageVersion, sourcePath, Path.GetFileName(sourcePath), isManagedAssembly: false, isNativeLibrary: true); 449return string.Equals(Path.GetFileName(path), "_._", StringComparison.OrdinalIgnoreCase);
NuGet\Commands\SearchCommand.cs (1)
184var configFile = Path.GetFileName(configPath);
src\Shared\BundleVersionLease.cs (1)
118var versionId = Path.GetFileName(fullVersionDirectory.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
src\Shared\IntegrationPackageProbeManifest.cs (1)
220var normalizedFileName = Path.GetFileName(libraryName);
Aspire.Acquisition.Tests (4)
Scripts\Common\ScriptFunctionCommand.cs (1)
36: base(GetExecutable(scriptPath), testOutput, label: $"{Path.GetFileName(scriptPath)}:func")
Scripts\Common\ScriptHostFixture.cs (1)
182var safeName = Path.GetFileName(requestPath);
Scripts\Common\ScriptToolCommand.cs (1)
28: base(GetExecutable(scriptPath), testOutput, label: Path.GetFileName(scriptPath))
Scripts\PRScriptInstallerModeTests.cs (1)
933$"NestedInstallerFiles entry '{rel}' from {Path.GetFileName(archive)} not found at {expected}. Manifest disagrees with archive contents.");
Aspire.Cli.EndToEnd.Tests (21)
Helpers\CliE2ETestHelpers.cs (8)
974TestContext.Current.KeyValueStorage[$"CaptureFile:{Path.GetFileName(fileName)}"] = path; 1024.Select(Path.GetFileName) 1039if (!packageFiles.Any(file => Path.GetFileName(file).StartsWith("Aspire.Hosting.", StringComparison.OrdinalIgnoreCase))) 1048if (!packageFiles.Any(file => Path.GetFileName(file).StartsWith(prefix, StringComparison.OrdinalIgnoreCase))) 1091var fileName = Path.GetFileName(file); 1161var captureFileName = Path.GetFileName(fileName); 1194var destFile = Path.Combine(destDir, Path.GetFileName(file)); 1200var dirName = Path.GetFileName(dir);
Helpers\TerminalRun.cs (3)
107WriteTestOutput($"[TerminalRun] {Path.GetFileName(subDir)}/: {fileCount} file(s)"); 129File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), overwrite: true); 134CopyDirectoryIfExists(dir, Path.Combine(destination, Path.GetFileName(dir)));
Helpers\TestDirectoryHelpers.cs (2)
23File.Copy(file, Path.Combine(destination, Path.GetFileName(file))); 28CopyDirectory(dir, Path.Combine(destination, Path.GetFileName(dir)));
JavaScriptPublishTests.cs (2)
330File.Copy(file, Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(file))); 336var targetDir = Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(fixtureDir));
ProjectReferenceTests.cs (1)
84var hiveName = Path.GetFileName(hiveDir);
tests\Shared\CliPackageDiscovery.cs (5)
32.Where(path => IsPointerPackageFileName(Path.GetFileName(path))) 34.OrderBy(package => Path.GetFileName(package.PackagePath), StringComparer.OrdinalIgnoreCase) 45$"Found {matches.Count} Aspire.Cli pointer nupkg files in '{packageDirectory}': {string.Join(", ", matches.Select(p => Path.GetFileName(p.PackagePath)))}. Expected exactly one Aspire.Cli.{{version}}.nupkg package."); 73var fileName = Path.GetFileName(packagePath); 92.Select(Path.GetFileName)
Aspire.Cli.Tests (36)
Backchannel\AppHostConnectionResolverTests.cs (1)
525var appHostId = Path.GetFileName(prefix);
BundleServiceTests.cs (1)
208var remaining = Directory.EnumerateDirectories(versionsRoot).Select(Path.GetFileName).ToArray();
Commands\AppHostLauncherTests.cs (2)
66var fileName = Path.GetFileName(path); 1254var appHostId = Path.GetFileName(prefix);
Commands\RunCommandTests.cs (1)
4336var appHostId = Path.GetFileName(prefix);
Commands\StartCommandTests.cs (1)
680var appHostId = Path.GetFileName(prefix);
Commands\StopCommandTests.cs (1)
1304var appHostId = Path.GetFileName(prefix);
DotNet\DotNetCliRunnerTests.cs (2)
529Assert.Contains("build", Path.GetFileName(binlogPath)); 530Assert.Contains("AppHost", Path.GetFileName(binlogPath));
Mcp\ApiDocs\ApiDocsCacheTests.cs (1)
121.Select(Path.GetFileName)
Mcp\Docs\DocsCacheTests.cs (2)
38.Select(Path.GetFileName) 88.Select(Path.GetFileName)
ProfileCaptureOptionsTests.cs (3)
66Assert.Contains("aspire-profile-", Path.GetFileName(options.OutputPath), StringComparison.Ordinal); 85Assert.Contains("aspire-profile-", Path.GetFileName(options.OutputPath), StringComparison.Ordinal); 103Assert.Contains("aspire-profile-", Path.GetFileName(options.OutputPath), StringComparison.Ordinal);
Projects\DotNetAppHostProjectTests.cs (1)
2552var appHostId = Path.GetFileName(prefix);
Projects\GuestAppHostProjectTests.cs (4)
1442var appHostId = Path.GetFileName(prefix); 1540["NODE_EXTRA_CA_CERTS"] = Path.GetFileName(devCertificatePath) 1653[configuredNodeExtraCaCertsKey] = Path.GetFileName(existingBundlePath) 1680envVars[configuredNodeExtraCaCertsKey] = Path.GetFileName(existingBundlePath);
Templating\JavaAppHostTemplateTests.cs (1)
89.Select(path => Path.GetFileName(path))
Utils\AppHostHelperTests.cs (8)
23var fileName = Path.GetFileName(socketPrefix); 70var fileName = Path.GetFileName(socketPrefix); 84var fileName = Path.GetFileName(socketPrefix); 253var appHostId = Path.GetFileName(prefix); 306var appHostId = Path.GetFileName(prefix); 386var appHostId = Path.GetFileName(prefix); 428var appHostId = Path.GetFileName(prefix); 598var appHostId = Path.GetFileName(upperPrefix);
Utils\CliPathHelperTests.cs (6)
25Assert.Equal(Path.GetFileName(socketPath1), socketPath1); 26Assert.Equal(Path.GetFileName(socketPath2), socketPath2); 35Assert.Matches("^h[A-Za-z0-9_-]{8}$", Path.GetFileName(socketPath1)); 36Assert.Matches("^h[A-Za-z0-9_-]{8}$", Path.GetFileName(socketPath2)); 53Assert.Matches("^h[A-Za-z0-9_-]{8}$", Path.GetFileName(socketPath1)); 54Assert.Matches("^h[A-Za-z0-9_-]{8}$", Path.GetFileName(socketPath2));
Utils\ReparsePointTests.cs (1)
260.Select(p => Path.GetFileName(p))
Aspire.Dashboard (7)
Components\Dialogs\GenAIVisualizerDialog.razor.cs (1)
334FileName: CalculateFileName(Path.GetFileName(result.LocalPath), uriPart.MimeType!));
ServiceClient\DashboardRunStore.cs (1)
183DatabaseFileName = Path.GetFileName(DatabasePath)
ServiceClient\TracingSqliteConnection.cs (3)
23new(base.BeginTransaction(), Path.GetFileName(databasePath), activitySource); 26new(base.BeginTransaction(isolationLevel), Path.GetFileName(databasePath), activitySource); 28protected override DbCommand CreateDbCommand() => new TracingDbCommand(base.CreateDbCommand(), Path.GetFileName(databasePath), activitySource);
src\Shared\Model\ResourceSourceViewModel.cs (2)
17return new ResourceSource(Path.GetFileName(projectPath), projectPath); 30return new ResourceSource(Path.GetFileName(executablePath), executablePath);
Aspire.Dashboard.Tests (1)
Model\DashboardDataSourceTests.cs (1)
89Assert.Equal(runStore.RunId, Path.GetFileName(runStore.RunDirectory));
Aspire.Deployment.EndToEnd.Tests (5)
tests\Shared\CliPackageDiscovery.cs (5)
32.Where(path => IsPointerPackageFileName(Path.GetFileName(path))) 34.OrderBy(package => Path.GetFileName(package.PackagePath), StringComparer.OrdinalIgnoreCase) 45$"Found {matches.Count} Aspire.Cli pointer nupkg files in '{packageDirectory}': {string.Join(", ", matches.Select(p => Path.GetFileName(p.PackagePath)))}. Expected exactly one Aspire.Cli.{{version}}.nupkg package."); 73var fileName = Path.GetFileName(packagePath); 92.Select(Path.GetFileName)
Aspire.EndToEnd.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
253_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (3)
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p))); 91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
Aspire.Hosting (16)
ApplicationModel\AspireStore.cs (1)
49filenameTemplate = Path.GetFileName(filenameTemplate);
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
157var fileName = Path.GetFileName(relativePath); 216Name = Path.GetFileName(fullPath),
Dashboard\DashboardEventHandlers.cs (3)
128var fileName = Path.GetFileName(assemblyPath); 200var fileName = Path.GetFileName(dashboardPath); 314var fileName = Path.GetFileName(fullyQualifiedDashboardPath);
Diagnostics\ProfilingTelemetry.cs (1)
259new(Tags.AppHostName, Path.GetFileName(appHostPath)),
DistributedApplicationOptions.cs (2)
151return Path.GetFileName(Path.TrimEndingDirectorySeparator(projectDirectory)); 157: Path.GetFileName(Path.TrimEndingDirectorySeparator(appHostDirectory));
ProjectResourceBuilderExtensions.cs (1)
1040var appFileName = Path.GetFileName(projectDirectoryPath);
src\Shared\BackchannelConstants.cs (4)
357var fileName = Path.GetFileName(socketPath); 392var fileName = Path.GetFileName(socketPath); 578var fileName = Path.GetFileName(f); 606var fileName = Path.GetFileName(f);
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
src\Shared\TerminalHost\TerminalHostPaths.cs (1)
149var fileName = Path.GetFileName(path);
Aspire.Hosting.Azure (1)
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Hosting.Azure.Kubernetes (1)
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Hosting.Blazor (2)
BlazorGatewayExtensions.cs (2)
143new(CustomResourceKnownProperties.Source, Path.GetFileName(projectPath)) 167new(CustomResourceKnownProperties.Source, Path.GetFileName(resolvedPath))
Aspire.Hosting.Blazor.Tests (2)
AddDotnetProjectBlazorGatewayTests.cs (2)
25Assert.Equal("Gateway.cs", Path.GetFileName(projectMetadata.ProjectPath)); 26Assert.Equal("Scripts", Path.GetFileName(Path.GetDirectoryName(projectMetadata.ProjectPath)));
Aspire.Hosting.Browsers (3)
ChromiumBrowserResolver.cs (2)
196var directoryName = Path.GetFileName(directoryPath); 267var directoryName = Path.GetFileName(directoryPath);
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Hosting.Browsers.Tests (3)
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (2)
196var directoryName = Path.GetFileName(directoryPath); 267var directoryName = Path.GetFileName(directoryPath);
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Hosting.Docker (2)
DockerComposePublishingContext.cs (1)
195sourcePath = Path.Combine(OutputPath, composeService.Name, Path.GetFileName(file.SourcePath));
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
944envVar.DefaultValue = "./" + Path.GetFileName(mount.Source);
Aspire.Hosting.Java (2)
JavaHostingExtensions.cs (2)
1969var fileName = Path.GetFileName(jarPath); 2082var directoryName = Path.GetFileName(workingDirectory.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
Aspire.Hosting.Java.Tests (3)
AddJavaAppPublishTests.cs (2)
989WriteWrapper(wrapperDirectory, Path.GetFileName(posixWrapper)); 990WriteWrapper(wrapperDirectory, Path.GetFileName(windowsWrapper));
AddJavaAppTests.cs (1)
1736Path.GetFileName(tempDir.Path.TrimEnd(Path.DirectorySeparatorChar)),
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
1588var aspireConfigPath = Path.Join(aspireConfigDir, $"aspire.{Path.GetFileName(configTarget)}");
Aspire.Hosting.Kubernetes.Tests (1)
KubernetesGatewayTests.cs (1)
41var gatewayFile = files.FirstOrDefault(f => Path.GetFileName(f) == "public.yaml");
Aspire.Hosting.Radius (1)
Secrets\SealedSecretArtifact.cs (1)
25Path.Combine(RootDirectoryName, storeName, Path.GetFileName(sourceManifestPath));
Aspire.Hosting.RemoteHost (1)
src\Shared\IntegrationPackageProbeManifest.cs (1)
220var normalizedFileName = Path.GetFileName(libraryName);
Aspire.Hosting.RemoteHost.Tests (1)
CodeGeneration\ApiReferenceExportTests.cs (1)
288var destinationPath = Path.Combine(destinationDirectory, Path.GetFileName(assemblyPath));
Aspire.Hosting.Rust (2)
RustDockerfileGenerator.cs (2)
308string.Equals(Path.GetFileName(entry), segments[i], StringComparison.Ordinal)) 311Path.GetFileName(entry).Normalize(NormalizationForm.FormC),
Aspire.Hosting.Rust.Tests (1)
AddRustAppPublishTests.cs (1)
627var storedDirectoryName = Path.GetFileName(Assert.Single(Directory.EnumerateDirectories(sourceDir.FullName)));
Aspire.Hosting.Sdk.Tests (2)
AppHostSdkTargetsTests.cs (2)
1406File.Copy(sourcePath, Path.Combine(destinationDirectory, Path.GetFileName(sourcePath)), overwrite: true); 1409return Path.Combine(destinationDirectory, Path.GetFileName(fakeCommandHostPath));
Aspire.Hosting.Tasks (3)
ResolveAspireCliBundle.cs (3)
345.ThenByDescending(Path.GetFileName, StringComparer.OrdinalIgnoreCase)) 360var directoryName = Path.GetFileName(path); 415var directoryName = Path.GetFileName(path);
Aspire.Hosting.Testing.Tests (1)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
128_testOutputHelper.WriteLine($"=== DCP Log: {Path.GetFileName(logFile)} ===");
Aspire.Hosting.Tests (15)
Backchannel\AppHostRpcTargetUploadTests.cs (1)
70Assert.NotEqual(expectedFileName, Path.GetFileName(filePath));
Backchannel\AuxiliaryBackchannelTests.cs (1)
288var fileName = Path.GetFileName(service.SocketPath);
Dashboard\DashboardServiceTests.cs (1)
884Assert.NotEqual(expectedFileName, Path.GetFileName(filePath));
Dashboard\InteractionFileUploadStoreTests.cs (4)
28Assert.NotEqual("test.txt", Path.GetFileName(filePath)); 297Assert.NotEqual(expectedLeafName, Path.GetFileName(filePath)); 315Assert.NotEqual(originalFileName, Path.GetFileName(filePath)); 331Assert.NotEmpty(Path.GetFileName(filePath));
Dcp\ProcessUtilTests.cs (1)
142var dotnetExecutableName = Path.GetFileName(dotnetPath);
Publishing\ResourceContainerImageManagerTests.cs (1)
1578? string.Join(", ", Directory.EnumerateFiles(outputPath, "*.tar").Select(Path.GetFileName).Take(10))
WithTerminalTests.cs (6)
1092Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ProducerUdsPath)); 1093Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ConsumerUdsPath)); 1145Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ProducerUdsPath)); 1146Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ConsumerUdsPath)); 1147Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ControlUdsPath)); 1148Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.MetadataPath));
Aspire.Hosting.TestUtilities (1)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
128_testOutputHelper.WriteLine($"=== DCP Log: {Path.GetFileName(logFile)} ===");
Aspire.Playground.Tests (1)
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
Aspire.Templates.Tests (5)
TemplateTestsBase.cs (1)
77var appHostProjectName = Path.GetFileName(project.AppHostProjectDirectory)!;
tests\Shared\TemplatesTesting\AspireProject.cs (1)
253_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (3)
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p))); 91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
Aspire.TerminalHost (1)
src\Shared\TerminalHost\TerminalHostPaths.cs (1)
149var fileName = Path.GetFileName(path);
Aspire.TestUtilities (1)
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
crossgen2 (3)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (3)
217zipFileName = zipFileName + "_" + Path.GetFileName(outputFilePath); 338reproPackagePath = Path.Combine(reproFileDir, Path.GetFileName(originalPath)); 373string searchPattern = Path.GetFileName(pattern);
Crossgen2Tasks (6)
PrepareForReadyToRunCompilation.cs (4)
278MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec)); 466bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec))); 467bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R; 471bool rootedInComposite = (r2rCompositeRootSet == null || r2rCompositeRootSet.Contains(Path.GetFileName(file.ItemSpec)));
RunReadyToRunCompiler.cs (2)
231if (IsPdbCompilation && string.Equals(Path.GetFileName(reference.ItemSpec), Path.GetFileName(_outputR2RImage), StringComparison.OrdinalIgnoreCase))
CSharpSyntaxGenerator (1)
Program.cs (1)
143var prefix = Path.GetFileName(inputFile);
dotnet (46)
BuildServer\BuildServerProvider.cs (1)
57Path.GetFileName(path).StartsWith(RazorPidFile.FilePrefix))
CommandFactory\CommandResolution\NuGetUtils.cs (1)
15return string.Equals(Path.GetFileName(path), PackagingCoreConstants.EmptyFolder, StringComparison.Ordinal);
CommandFactory\CommandResolution\PackagedCommandSpecFactoryWithCliRuntime.cs (1)
26Path.GetFileName(commandPath)));
CommandFactory\CommandResolution\ToolPathCalculator.cs (1)
82var version = Path.GetFileName(versionDirectory);
Commands\Hidden\InternalReportInstallSuccess\InternalReportInstallSuccessCommand.cs (1)
29var exeName = Path.GetFileName(result.GetValue(definition.Argument));
Commands\New\BuiltInTemplatePackageProvider.cs (1)
81if (SemanticVersion.TryParse(Path.GetFileName(directory), out SemanticVersion? versionInfo) && versionInfo is not null)
Commands\New\SdkInfoProvider.cs (2)
52sdks = NETCoreSdkResolverNativeWrapper.GetAvailableSdks(dotnetDir).Select(Path.GetFileName); 59sdks = Directory.Exists(sdkDir) ? Directory.GetDirectories(sdkDir).Select(Path.GetFileName).Where(IsValidFxVersion) : [];
Commands\Project\Convert\ProjectConvertCommand.cs (3)
145var targetFile = Path.Join(outputDirectory, Path.GetFileName(sourceFile)); 382itemRelativePath = Path.GetFileName(itemFullPath); 519var projectFileName = Path.GetFileName(project.Name);
Commands\Run\CSharpCompilerCommand.cs (2)
62internal string FileName => field ??= Path.GetFileName(EntryPointFileFullPath); 371var executingRuntimeVersion = Path.GetFileName(Path.GetDirectoryName(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()));
Commands\Solution\Add\SolutionAddCommand.cs (2)
193string projectFileName = Path.GetFileName(solutionRelativeProjectPath); 203p => IsInSameFolderHierarchy(p.Parent, rootFolder) && Path.GetFileName(p.FilePath).Equals(projectFileName, StringComparison.OrdinalIgnoreCase));
Commands\Test\MTP\MSBuildHandler.cs (1)
54string.Join(Environment.NewLine, vsTestTestProjects.Select(module => Path.GetFileName(module.ProjectFullPath))).Red().Bold()));
Commands\Test\MTP\SolutionAndProjectUtility.cs (3)
339Logger.LogTrace($"Loaded project '{Path.GetFileName(projectFilePath)}' with TargetFramework '{targetFramework}', TargetFrameworks '{targetFrameworks}', IsTestProject '{projectInstance.GetPropertyValue(ProjectProperties.IsTestProject)}', and '{ProjectProperties.IsTestingPlatformApplication}' is '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}'."); 369Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}')."); 383Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
56public string AssemblyName { get; } = Path.GetFileName(assembly)!;
Commands\Workload\Install\FileBasedInstaller.cs (11)
411var installedSdkFeatureBands = NETCoreSdkResolverNativeWrapper.GetAvailableSdks(_dotnetDir).Select(sdkDir => new SdkFeatureBand(Path.GetFileName(sdkDir))).ToHashSet(); 726var workloadSetVersion = Path.GetFileName(workloadSetVersionDir); 729var workloadSetFeatureBand = new SdkFeatureBand(Path.GetFileName(workloadSetFeatureBandDir)); 732var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord)); 777var manifestId = new ManifestId(Path.GetFileName(manifestIdDir)); 780var manifestVersion = new ManifestVersion(Path.GetFileName(manifestVersionDir)); 783var manifestFeatureBand = new SdkFeatureBand(Path.GetFileName(manifestFeatureBandDir)); 786var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord)); 819var packId = new WorkloadPackId(Path.GetFileName(packIdDir)); 822var packVersion = Path.GetFileName(packVersionDir); 825var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(bandRecord));
Commands\Workload\Install\FileBasedManifestInstaller.cs (1)
41var extractionPath = Path.Combine(tempPackagesDir.Value, "dotnet-sdk-advertising-temp", $"{Path.GetFileName(nupkgPath)}-extracted");
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (1)
204Path.GetFileName(path).StartsWith(manifestPackageId.ToString(), StringComparison.OrdinalIgnoreCase) &&
Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
22.Select(path => new SdkFeatureBand(Path.GetFileName(path))); 36.Select(file => new WorkloadId(Path.GetFileName(file)));
NugetPackageDownloader\NuGetPackageDownloader.cs (3)
425(Path.GetFileName(p) == Path.GetFileNameWithoutExtension(p)); 445allowListNuspec.Contains(Path.GetFileName(f), comparer: StringComparer.OrdinalIgnoreCase))) 504string nugetConfigFileName = Path.GetFileName(packageSourceLocation.NugetConfig.Value.Value);
ShellShim\ShellShimRepository.cs (2)
206FilePath[] candidatepackagedShim = [.. packagedShims.Where(s => string.Equals(Path.GetFileName(s.Value), Path.GetFileName(GetShimPath(toolCommand).Value)))];
ShellShim\ZshDetector.cs (1)
24if (Path.GetFileName(environmentVariable).Equals(ZshFileName, StringComparison.OrdinalIgnoreCase))
ToolPackage\ToolPackageInstance.cs (2)
106.Select(path => NuGetFramework.ParseFolder(Path.GetFileName(path))).ToList(); 187.Select(path => NuGetFramework.ParseFolder(Path.GetFileName(path)))
ToolPackage\ToolPackageStoreAndQuery.cs (3)
27Path.GetFileName( 66var name = Path.GetFileName(subdirectory); 93version: NuGetVersion.Parse(Path.GetFileName(subdirectory)),
dotnet-aot (8)
src\sdk\src\Cli\dotnet\Commands\Workload\Install\FileBasedManifestInstaller.cs (1)
41var extractionPath = Path.Combine(tempPackagesDir.Value, "dotnet-sdk-advertising-temp", $"{Path.GetFileName(nupkgPath)}-extracted");
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (1)
204Path.GetFileName(path).StartsWith(manifestPackageId.ToString(), StringComparison.OrdinalIgnoreCase) &&
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
22.Select(path => new SdkFeatureBand(Path.GetFileName(path))); 36.Select(file => new WorkloadId(Path.GetFileName(file)));
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (3)
425(Path.GetFileName(p) == Path.GetFileNameWithoutExtension(p)); 445allowListNuspec.Contains(Path.GetFileName(f), comparer: StringComparer.OrdinalIgnoreCase))) 504string nugetConfigFileName = Path.GetFileName(packageSourceLocation.NugetConfig.Value.Value);
src\sdk\src\Cli\dotnet\ShellShim\ZshDetector.cs (1)
24if (Path.GetFileName(environmentVariable).Equals(ZshFileName, StringComparison.OrdinalIgnoreCase))
dotnet-dev-certs (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-format (3)
Formatters\OrganizeImportsFormatter.cs (1)
58logger.LogWarning(Resources.Unable_to_organize_imports_for_0_The_document_is_too_complex, Path.GetFileName(document.FilePath));
Utilities\GeneratedCodeUtilities.cs (1)
41var fileName = Path.GetFileName(filePath);
Workspaces\MSBuildWorkspaceFinder.cs (1)
72throw new FileNotFoundException(string.Format(Resources.The_file_0_does_not_appear_to_be_a_valid_project_solution_file_or_file_based_app, Path.GetFileName(workspacePath)));
dotnet-getdocument (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-openapi (2)
Commands\BaseCommand.cs (1)
372var fileName = Path.GetFileName(contentDisposition.FileName);
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-suggest (1)
SuggestionDispatcher.cs (1)
209targetExeName = Path.GetFileName(targetExeName).RemoveExeExtension();
dotnet-svcutil-lib (24)
CommandProcessorOptions.cs (4)
492var updateFileName = Path.GetFileName(this.UpdateServiceReferenceFolder); 506var paramsFiles = jsonFiles.Except(excludeJsonFiles).Where(fn => Path.GetFileName(fn).Equals(CommandProcessorOptions.SvcutilParamsFileName, RuntimeEnvironmentHelper.FileStringComparison) || 507Path.GetFileName(fn).Equals(CommandProcessorOptions.WCFCSParamsFileName, RuntimeEnvironmentHelper.FileStringComparison)); 551if (Path.GetFileName(paramsFilePath).Equals(CommandProcessorOptions.WCFCSParamsFileName))
FrameworkFork\Microsoft.CodeDom\Microsoft\VBCodeProvider.cs (1)
610string fileName = Path.GetFileName(s);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
127string assemblyName = System.IO.Path.GetFileName(assembly.Location);
Metadata\MetadataDocumentLoader.cs (1)
550fullFileName = Path.Combine(basePath, Path.GetFileName(schemaLocation));
Metadata\MetadataDocumentSaver.cs (4)
146var updatedLocation = Path.Combine(this.DirectoryPath, Path.GetFileName(location)); 223wsdl.RetrievalUrl = Path.GetFileName(filePath); 245schema.SourceUri = Path.GetFileName(filePath); 306this.FileNameMgr.AddFileName(this.DirectoryPath, Path.GetFileName(uri.LocalPath), extension);
Metadata\MetadataFileNameManager.cs (1)
252string filename = Path.GetFileName(path);
Shared\MSBuildProj.cs (5)
161using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Parsing project {Path.GetFileName(projectFullPath)}").ConfigureAwait(false)) 167FileName = Path.GetFileName(projectFullPath), 900var targetLib = Path.GetFileName(this._resolvedProperties["TargetPath"].Trim('\"')); 917if (!Path.GetFileName(assetPath).Equals(targetLib, RuntimeEnvironmentHelper.FileStringComparison)) 1010.Where(d => Path.GetFileName(d).Equals(fileName, RuntimeEnvironmentHelper.FileStringComparison))
Shared\ProjectDependency.cs (1)
150fileHasKnownExtension ? Path.GetFileNameWithoutExtension(filePath) : Path.GetFileName(filePath);
Shared\Utilities\PathHelper.cs (2)
112var childFileName = Path.GetFileName(childPath); 253fullPath = EnumerateItems(workingDir).Where(item => Path.GetFileName(item).Equals(itemName, RuntimeEnvironmentHelper.FileStringComparison)).FirstOrDefault();
Shared\Utilities\ProcessRunner.cs (4)
114Console.WriteLine($"Starting process in the background: {Path.GetFileName(proc.ProcessName)}, ID: {proc.Id}."); 115Console.WriteLine($"{Path.GetFileName(currentDir)}>{processName} {processArgs}{Environment.NewLine}"); 150var exitCode = Path.GetFileName(processName) == Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName) ? proc.ExitCode : -1;
dotnet-svcutil-lib.Tests (6)
E2ETests.cs (1)
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
ProjectUtils.cs (1)
180var dstParamsFile = Path.Combine(outputDir, Path.GetFileName(srcParamsFile));
TestInit.cs (2)
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile)))) 354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
UnitTest.cs (2)
330var jsonFileDstPath = Path.Combine(this_TestCaseOutputDir, Path.GetFileName(jsonFileSrcPath)); 353var outJsonFile = Path.Combine(outputDir, Path.GetFileName(jsonFileSrcPath));
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
174string filename = Path.GetFileName(path);
dotnet-user-jwts (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-user-secrets (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-watch (1)
Watch\MsBuildFileSetFactory.cs (1)
79logger.LogError("Error(s) finding watch items project file '{FileName}'.", Path.GetFileName(rootProjectFile));
GenerateAnalyzerNuspec (2)
Program.cs (2)
161var directoryName = Path.GetFileName(directory); 212var fileName = Path.GetFileName(file);
GenerateDocumentationAndConfigFiles (9)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (2)
43=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 51=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
GetDocument.Insider (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
HelixTestTasks (1)
GroupWorkItems.cs (1)
120string name = Path.GetFileName(itemSpec);
ilc (3)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (3)
217zipFileName = zipFileName + "_" + Path.GetFileName(outputFilePath); 338reproPackagePath = Path.Combine(reproFileDir, Path.GetFileName(originalPath)); 373string searchPattern = Path.GetFileName(pattern);
ILCompiler.Build.Tasks (3)
ComputeManagedAssembliesToCompileToNative.cs (3)
93var fileName = Path.GetFileName(taskItem.ItemSpec); 100var fileName = Path.GetFileName(taskItem.ItemSpec); 109string assemblyFileName = Path.GetFileName(itemSpec);
ILCompiler.Compiler (4)
Compiler\MstatObjectDumper.cs (1)
48var asmName = new AssemblyNameInfo(Path.GetFileName(fileName),
Compiler\ObjectWriter\Dwarf\DwarfBuilder.cs (1)
484new DwarfFileName(Path.GetFileName(sequencePoint.FileName), Path.GetDirectoryName(sequencePoint.FileName));
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.cs (1)
349candidatePath = Path.Combine(Path.GetDirectoryName(peFilePath), Path.GetFileName(candidatePath));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
608Utf8String moduleName = new Utf8String(Path.GetFileName(_outputPath));
ILCompiler.Diagnostics (1)
PdbWriter.cs (1)
215_ngenWriter.OpenModW(originalDllPath, Path.GetFileName(originalDllPath), out _pdbMod);
ILCompiler.ReadyToRun (5)
Compiler\ReadyToRunCodegenCompilation.cs (2)
442string ownerExecutableName = Path.GetFileName(outputFile); 462relativeMsilPath = Path.GetFileName(inputFile);
IBC\MIbcProfileParser.cs (1)
107ZipArchiveEntry mibcDataEntry = zipFile.GetEntry(Path.GetFileName(filename) + ".dll");
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.cs (1)
349candidatePath = Path.Combine(Path.GetDirectoryName(peFilePath), Path.GetFileName(candidatePath));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
608Utf8String moduleName = new Utf8String(Path.GetFileName(_outputPath));
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\IBC\MIbcProfileParser.cs (1)
107ZipArchiveEntry mibcDataEntry = zipFile.GetEntry(Path.GetFileName(filename) + ".dll");
illink (1)
ILLink.Tasks (1)
LinkTask.cs (1)
259protected override string ToolName => Path.GetFileName(DotNetPath);
Infrastructure.Tests (12)
PowerShellScripts\AspireSkillsBundleHashTests.cs (1)
73.Select(Path.GetFileName)
PowerShellScripts\ScanTestPartitionsFromSourceGuardTests.cs (1)
57if (Path.GetFileName(file) == "ScanTestPartitionsFromSourceGuardTests.cs")
PowerShellScripts\StageNativeCliToolPackagesTests.cs (1)
340.Select(Path.GetFileName)
Shared\TestTrxBuilder.cs (1)
64var trxPath = Path.Combine(tempDirectory, Path.GetFileName(trxEntryPath));
src\Shared\PathLookupHelper.cs (1)
222return !string.Equals(Path.GetFileName(executablePath), executablePath, StringComparison.Ordinal)
TestTriggerMap\GraphAffectedProjectsTests.cs (2)
304compiles.Select(c => $""" <Compile Include="{c}" Link="{System.IO.Path.GetFileName(c)}" />""") 405compiles.Select(c => $""" <Compile Include="{c}" Link="{System.IO.Path.GetFileName(c)}" />""")
TestTriggerMap\SelectTestsAcceptanceTests.cs (3)
937var name = Path.GetFileName(projectDir); 956foreach (var dir in Directory.EnumerateDirectories(componentsRoot).Select(Path.GetFileName).Order(StringComparer.Ordinal)) 972.Select(Path.GetFileName)
TestTriggerMap\SelectTestsLayer1IntegrationTests.cs (1)
392compiles.Select(c => $""" <Compile Include="{c}" Link="{System.IO.Path.GetFileName(c)}" />""")
TestTriggerMap\TestTriggerMapTests.cs (1)
167.Select(Path.GetFileName)
installer.tasks (4)
GenerateFileVersionProps.cs (2)
59var fileName = Path.GetFileName(file.ItemSpec); 131var manifestFileName = Path.GetFileName(PlatformManifestFile);
GenerateRunScript.cs (1)
45string extension = Path.GetExtension(Path.GetFileName(OutputPath)).ToLowerInvariant();
GenerateTestSharedFrameworkDepsFile.cs (1)
61string fileName = Path.GetFileName(filePath);
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
VerifyScrubbers.cs (1)
50if (Path.GetFileName(path).Equals("launchSettings.json", StringComparison.OrdinalIgnoreCase))
Microsoft.Arcade.Common (2)
FileSystem.cs (1)
23public string? GetFileName(string? path) => Path.GetFileName(path);
ZipArchiveManager.cs (1)
30string entryName = Path.GetFileName(filePath);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
166 string matchPathSuffix = "/" + Path.GetFileName(relativePath);
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
166 string matchPathSuffix = "/" + Path.GetFileName(relativePath);
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
166 string matchPathSuffix = "/" + Path.GetFileName(relativePath);
Microsoft.AspNetCore.Diagnostics (2)
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (2)
402Write(System.IO.Path.GetFileName(firstFrame.File)); 650Write(System.IO.Path.GetFileName(frame.File));
Microsoft.AspNetCore.Hosting (2)
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (2)
348Write(System.IO.Path.GetFileName(firstFrame.File)); 549Write(System.IO.Path.GetFileName(frame.File));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
src\aspnetcore\src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (1)
63var fileName = Path.GetFileName(model.RelativePath);
Microsoft.AspNetCore.Mvc.RazorPages (1)
ApplicationModels\PageRouteModelFactory.cs (1)
63var fileName = Path.GetFileName(model.RelativePath);
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (2)
469Path.GetFileName(contentRootAttribute.ContentRootTest)); 577Path.GetFileName(depsFile.FullName)));
Microsoft.AspNetCore.Razor.Utilities.Shared (3)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
Microsoft.AspNetCore.Server.IIS (2)
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (2)
348Write(System.IO.Path.GetFileName(firstFrame.File)); 549Write(System.IO.Path.GetFileName(frame.File));
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\CertificatePathWatcher.cs (2)
141() => dirMetadata.FileProvider.Watch(Path.GetFileName(path)), 185var fileInfo = dirMetadata.FileProvider.GetFileInfo(Path.GetFileName(path));
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserRefreshMiddleware.cs (1)
146!string.Equals(Path.GetFileName(request.Path.Value), "blazor.boot.json", StringComparison.OrdinalIgnoreCase))
Microsoft.Build (38)
BackEnd\BuildManager\BuildManager.cs (1)
1414string projectName = projectFile is not null ? Path.GetFileName(projectFile) : "?";
BackEnd\Components\Communications\CurrentHost.cs (1)
41&& Path.GetFileName(processPath) == Constants.DotnetProcessName)
BackEnd\Components\Communications\NodeLauncher.cs (1)
98string fileName = Path.GetFileName(msbuildLocation);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (3)
536bool isAppHost = Path.GetFileName(location) 562|| !Path.GetFileName(msbuildLocation).Equals(Constants.MSBuildExecutableName, StringComparison.OrdinalIgnoreCase) 563|| !string.Equals(Path.GetFileName(EnvironmentUtilities.ProcessPath), Constants.DotnetProcessName, StringComparison.OrdinalIgnoreCase))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
580string lastDirectoryName = Path.GetFileName(path.TrimEnd(Path.DirectorySeparatorChar));
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
77checkContext.DispatchFailedAcquisitionTelemetry(System.IO.Path.GetFileName(checkAcquisitionData.AssemblyPath), ex);
BuildCheck\Checks\CopyAlwaysCheck.cs (1)
84Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\DoubleWritesCheck.cs (3)
92CheckWrite(context, Path.Combine(destinationFolderPath, Path.GetFileName(sourceFilePath))); 119Path.GetFileName(context.Data.ProjectFilePath), 120Path.GetFileName(existingEntry.projectFilePath),
BuildCheck\Checks\EmbeddedResourceCheck.cs (1)
79Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\ExecCliBuildCheck.cs (2)
84Path.GetFileName(context.Data.ProjectFilePath), 100Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\PreferProjectReferenceCheck.cs (4)
75Path.GetFileName(context.Data.ProjectFilePath), 76Path.GetFileName(projectProducingOutput.Item1), 103Path.GetFileName(projectReferencedViaOutput), 104Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\SharedOutputPathCheck.cs (2)
81Path.GetFileName(projectPath), 82Path.GetFileName(conflictingProject),
BuildCheck\Checks\TargetFrameworkConfusionCheck.cs (1)
59Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\TargetFrameworkUnexpectedCheck.cs (1)
98Path.GetFileName(context.Data.ProjectFilePath),
Construction\Solution\SolutionProjectGenerator.cs (3)
1074string escapedSolutionFileName = EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath)); 2358globalProperties.AddProperty("SolutionFileName", EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath))); 2361globalProperties.AddProperty(SolutionPathPropertyName, EscapingUtilities.Escape(Path.Combine(_solutionFile.SolutionFileDirectory, Path.GetFileName(_solutionFile.FullPath))));
Definition\ToolsetReader.cs (1)
210var version = Path.GetFileName(d);
ElementLocation\XmlDocumentWithLocation.cs (1)
358if (Path.GetFileName(fullPath).StartsWith("Microsoft.", StringComparison.OrdinalIgnoreCase))
Evaluation\Expander.PropertyExpander.cs (1)
524value = Path.GetFileName(elementLocation.File);
Evaluation\Expander\WellKnownFunctions.cs (1)
134returnVal = Path.GetFileName(arg0);
Evaluation\Profiler\EvaluationLocationPrettyPrinterBase.cs (1)
101evaluationLocation.File == null ? string.Empty : System.IO.Path.GetFileName(evaluationLocation.File),
Graph\GraphBuilder.cs (2)
315solutionGlobalPropertiesBuilder["SolutionFileName"] = EscapingUtilities.Escape(Path.GetFileName(Solution.FullPath)); 317solutionGlobalPropertiesBuilder[SolutionProjectGenerator.SolutionPathPropertyName] = EscapingUtilities.Escape(Path.Combine(Solution.SolutionFileDirectory, Path.GetFileName(Solution.FullPath)));
Instance\TaskFactories\AssemblyTaskFactory.cs (1)
263string assemblyName = loadInfo.AssemblyName ?? Path.GetFileName(loadInfo.AssemblyFile);
Instance\TaskRegistry.cs (1)
1197!FileClassifier.IsMicrosoftAssembly(Path.GetFileName(_taskFactoryAssemblyLoadInfo.AssemblyFile)) &&
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
73Path.GetFileName(logFilePath),
src\msbuild\src\Shared\TypeLoader.cs (1)
310assembliesDictionary[Path.GetFileName(path)] = path;
Utilities\FileSpecMatchTester.cs (1)
90string filename = Path.GetFileName(normalizedFileToMatch);
Microsoft.Build.Framework (8)
ProjectFinishedEventArgs.cs (1)
114RawMessage = FormatResourceStringIgnoreCodeAndKeyword(Succeeded ? "ProjectFinishedSuccess" : "ProjectFinishedFailure", Path.GetFileName(ProjectFile));
ProjectStartedEventArgs.cs (1)
536string? projectFilePath = Path.GetFileName(ProjectFile);
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
TargetFinishedEventArgs.cs (1)
181RawMessage = FormatResourceStringIgnoreCodeAndKeyword(Succeeded ? "TargetFinishedSuccess" : "TargetFinishedFailure", targetName, Path.GetFileName(projectFile));
Telemetry\BuildTelemetry.cs (1)
218AddIfNotNull(ProjectPath != null ? Path.GetFileName(ProjectPath) : null, nameof(ProjectPath));
Utilities\FileMatcher.cs (2)
649longParts[i - startingElement] = Path.GetFileName(longPath); 3265string directoryName = Path.GetFileName(subdirectory);
Utilities\FrameworkLocationHelper.cs (1)
851string leaf = Path.GetFileName(currentRuntimePath);
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.Build.Tasks.Core (34)
AddToWin32Manifest.cs (1)
151SaveManifest(document, Path.GetFileName(ApplicationManifest?.ItemSpec) ?? DefaultManifestName);
AssemblyDependency\ReferenceTable.cs (2)
1003string cultureName = Path.GetFileName(subDirectory); 2855yield return new KeyValuePair<string, string>(ItemMetadataNames.winmdImplmentationFile, Path.GetFileName(reference.ImplementationAssembly));
AssignTargetPath.cs (2)
142targetPath = Path.GetFileName(Files[i].ItemSpec); 160targetPath = Path.GetFileName(Files[i].ItemSpec);
Copy.cs (2)
830() => Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec)), 858string srcName = Path.GetFileName(src);
CreateCSharpManifestResourceName.cs (1)
208manifestName.Append(Path.GetFileName(info.cultureNeutralFilename));
CreateManifestResourceName.cs (1)
181string conventionDependentUpon = Path.ChangeExtension(Path.GetFileName(fileName), SourceFileExtension);
CreateVisualBasicManifestResourceName.cs (1)
194manifestName.Append(Path.GetFileName(info.cultureNeutralFilename));
DownloadFile.cs (1)
331: Path.GetFileName(requestUri.LocalPath); // Otherwise attempt to get a file name from the URI
FindAppConfigFile.cs (1)
125string filename = (matchWholeItemSpec ? item.ItemSpec : Path.GetFileName(item.ItemSpec));
FindInList.cs (1)
108string filename = (MatchFileNameOnly ? Path.GetFileName(path) : path);
GenerateApplicationManifest.cs (1)
239name = Path.GetFileName(item.ItemSpec);
GenerateLauncher.cs (1)
73string entryPointFileName = Path.GetFileName(EntryPoint.ItemSpec);
GenerateManifestBase.cs (3)
564file.TargetPath = Path.IsPathRooted(file.SourcePath) || file.SourcePath.StartsWith("..", StringComparison.Ordinal) ? Path.GetFileName(file.SourcePath) : file.SourcePath; 615string manifestFileName = Path.GetFileName(OutputManifest.ItemSpec); 654Util.WriteLog($"Total time to generate manifest '{Path.GetFileName(OutputManifest.ItemSpec)}': t={Environment.TickCount - _startTime}");
ManifestUtil\ApplicationManifest.cs (1)
432string outputFileName = Path.GetFileName(SourcePath);
ManifestUtil\BaseReference.cs (1)
59return Path.GetFileName(path);
ManifestUtil\LauncherBuilder.cs (1)
67string launcherFilename = Path.GetFileName(LauncherPath);
ManifestUtil\Manifest.cs (2)
517string fileName = Path.GetFileName(f.ResolvedPath); 545f.TargetPath = BaseReference.GetDefaultTargetPath(Path.GetFileName(f.ResolvedPath));
ManifestUtil\ManifestReader.cs (1)
28string manifestFileName = Path.GetFileName(path);
Move.cs (1)
131destinationFile = Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec));
NativeMethods.cs (2)
372var assemblyName = Path.GetFileName(dir); 377var versionString = Path.GetFileName(version);
ResolveCodeAnalysisRuleSet.cs (1)
84if (CodeAnalysisRuleSet == Path.GetFileName(CodeAnalysisRuleSet))
ResolveManifestFiles.cs (2)
304targetPath = Path.GetFileName(item.ItemSpec); 382targetPath = Path.GetFileName(item.ItemSpec);
SystemState.cs (1)
464string filename = Path.GetFileName(path);
Untar.cs (1)
297if (tarEntry.EntryType is TarEntryType.Directory || Path.GetFileName(destinationPath.FullName).Length == 0)
Unzip.cs (1)
196if (Path.GetFileName(destinationPath.FullName).Length == 0)
WriteCodeFragment.cs (1)
128OutputFile = new TaskItem(Path.Combine(OutputDirectory.ItemSpec, Path.GetFileName(outputFilePath.Value)));
Microsoft.Build.Utilities.Core (2)
ToolTask.cs (1)
548bool isOnlyFileName = Path.GetFileName(pathToTool).Length == pathToTool.Length;
TrackedDependencies\TrackedDependencies.cs (1)
40string searchPattern = Path.GetFileName(item.ItemSpec);
Microsoft.CodeAnalysis (17)
CommandLine\AnalyzerConfig.cs (2)
167_hasGlobalFileName = Path.GetFileName(pathToFile).Equals(UserGlobalConfigName, StringComparison.OrdinalIgnoreCase); 189if (pathToFile is null || !Path.IsPathRooted(pathToFile) || string.IsNullOrEmpty(Path.GetFileName(pathToFile)))
CommandLine\CommandLineParser.cs (1)
301outputFileName = Path.GetFileName(resolvedPath);
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
81var newFilePath = Path.Combine(Path.GetDirectoryName(_filePath)!, Guid.NewGuid().ToString() + "_" + Path.GetFileName(_filePath));
CommandLine\CommonCompiler.cs (1)
1278emitOptions = emitOptions.WithPdbFilePath(Path.GetFileName(emitOptions.PdbFilePath));
Compilation\DeterministicKeyBuilder.cs (2)
52filePath = Path.GetFileName(filePath); 549writer.Write("cryptoKeyFile", options.CryptoKeyFile is { } keyFile ? Path.GetFileName(keyFile) : null);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
308var assemblyFileName = Path.GetFileName(assemblyFilePath);
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
182string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 306var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 320var satelliteFileName = Path.GetFileName(satelliteFilePath); 321var satelliteDirectoryName = Path.GetFileName(Path.GetDirectoryName(satelliteFilePath));
InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
60var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
Microsoft.CodeAnalysis.Analyzers (18)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (4)
130string arg4 = Path.GetFileName(additionalText.Path); 184string arg2 = Path.GetFileName(additionalText.Path); 218string fileName = Path.GetFileName(textFile.Path); 336string arg2 = Path.GetFileName(additionalText.Path);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (4)
203string arg3 = Path.GetFileName(path); 234string arg1 = Path.GetFileName(path); 257string fileName = Path.GetFileName(text.Path); 466string arg1 = Path.GetFileName(releaseTrackingLine.Path);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (1)
59var fileName = Path.GetFileName(file.Path);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (2)
43=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 51=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (2)
43=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 51=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
76var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
Microsoft.CodeAnalysis.CSharp (1)
Utilities\InterceptableLocation.cs (1)
106var displayFileName = Path.GetFileName(_path);
Microsoft.CodeAnalysis.Extensions.Package (4)
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
Microsoft.CodeAnalysis.Features (16)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (2)
102var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath)); 111var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath));
AddFileBanner\AddFileBannerHelpers.cs (2)
54var sourceName = IOUtilities.PerformIO(() => Path.GetFileName(sourceDocument.FilePath)); 55var destinationName = IOUtilities.PerformIO(() => Path.GetFileName(destinationFilePath));
AddImport\References\MetadataSymbolReference.cs (1)
46return (string.Format(FeaturesResources.Add_reference_to_0, Path.GetFileName(_reference.FilePath)),
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
277var fileName = filePath == null ? null : IOUtilities.PerformIO(() => Path.GetFileName(filePath)) ?? filePath;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
367Path.GetFileName(fileInfo.TemporaryFilePath),
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
46var filePath = Path.Combine(tempFilePath, Path.GetFileName(sourceDocument.FilePath)); 127var relativePath = Path.GetFileName(sourceDocument.FilePath);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
105telemetryMessage.SetDll(Path.GetFileName(dllPath)); 351name: Path.GetFileName(info.FilePath),
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
76var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
src\roslyn\src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
StackTraceExplorer\StackTraceExplorerService.cs (2)
96var documentName = Path.GetFileName(fileName); 108var name = Path.GetFileName(document.Name);
UnusedReferences\UnusedReferencesRemover.cs (1)
149.SelectAsArray(assemblyPath => Path.GetFileName(assemblyPath));
Microsoft.CodeAnalysis.NetAnalyzers (6)
Microsoft.CodeQuality.Analyzers\Maintainability\CodeMetricsAnalyzer.cs (2)
307string fileName = Path.GetFileName(textFile.Path); 431string arg2 = Path.GetFileName(additionalText.Path);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\AdditionalFileProvider.cs (2)
42=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 50=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
51var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 52var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\Components\ComponentDiagnosticFactory.cs (1)
110var fileName = Path.GetFileName(source.FilePath);
Language\FileKinds.cs (1)
41var fileName = Path.GetFileName(filePath);
Language\RazorCodeDocumentExtensions.cs (1)
56(codeDocument.FileKind.IsLegacy() && string.Equals(Path.GetFileName(codeDocument.Source.FilePath), MvcImportProjectFeature.ImportsFileName, StringComparison.OrdinalIgnoreCase));
Mvc\RazorExtensionsDiagnosticFactory.cs (1)
85var fileName = Path.GetFileName(source.FilePath);
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (2)
43=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 51=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
410string shadowCopyPath = Path.Combine(assemblyCopyDir, Path.GetFileName(originalPath)); 546string assemblyFileName = Path.GetFileName(originalAssemblyPath);
Microsoft.CodeAnalysis.Workspaces (13)
Shared\TestHooks\AsynchronousOperationListener+DiagnosticAsyncToken.cs (1)
32public override string ToString() => $"{Name} {Path.GetFileName(FilePath)} {LineNumber}";
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
308var assemblyFileName = Path.GetFileName(assemblyFilePath);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
182string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 306var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 320var satelliteFileName = Path.GetFileName(satelliteFilePath); 321var satelliteDirectoryName = Path.GetFileName(Path.GetDirectoryName(satelliteFilePath));
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
Workspace\CommandLineProject.cs (1)
160var name = Path.GetFileName(relativePath);
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
81var fileName = Path.GetFileName(fullPath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
MSBuild\ProjectFile\ProjectInstanceReader.cs (1)
194=> !Path.GetFileName(item.ItemSpec).StartsWith("TemporaryGeneratedFile_", StringComparison.Ordinal);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.Deployment.DotNet.Releases (1)
ReleaseFile.cs (1)
38public string FileName => Path.GetFileName(Address.LocalPath);
Microsoft.Diagnostics.DataContractReader.Legacy (4)
DebugExtensions.cs (1)
110string message = $"HResult mismatch - cDAC: 0x{unchecked((uint)cdacHr):X8}, DAC: 0x{unchecked((uint)dacHr):X8} ({Path.GetFileName(filePath)}:{lineNumber})";
LegacyFallbackHelper.cs (3)
44if (s_allowlist.Contains(name) || s_fileAllowlist.Contains(Path.GetFileName(file))) 46Console.Error.WriteLine($"[cDAC] Allowed fallback: {name} at {Path.GetFileName(file)}:{line}"); 50Console.Error.WriteLine($"[cDAC] Blocked fallback: {name} at {Path.GetFileName(file)}:{line}");
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsClient\DiagnosticsClient.cs (1)
502if (!int.TryParse(Path.GetFileName(procEntry), NumberStyles.Integer, CultureInfo.InvariantCulture, out int hostPid))
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\ValidateAssemblies.cs (1)
131string filename = Path.GetFileName(path);
Microsoft.DotNet.ApiSymbolExtensions (6)
AssemblySymbolLoader.cs (6)
88ImmutableHashSet<string> fileNames = assembliesPaths.Select(path => Path.GetFileName(path)).ToImmutableHashSet(); 138string assemblyName = Path.GetFileName(path); 160ImmutableHashSet<string> fileNames = paths.Select(path => Path.GetFileName(path)).ToImmutableHashSet(); 189ImmutableHashSet<string> fileNames = relativePaths.Select(relativePath => Path.GetFileName(relativePath)).ToImmutableHashSet(); 205string name = Path.GetFileName(relativePaths[i]); 384string name = Path.GetFileName(path);
Microsoft.DotNet.Build.Tasks.FileCatalog (2)
CatalogEntry.cs (2)
23/// Optional logical name for the entry. Defaults to <see cref="Path.GetFileName(string)"/> 56return new CatalogEntry(name ?? Path.GetFileName(filePath), sha1.GetHashAndReset(), sha256.GetHashAndReset());
Microsoft.DotNet.Build.Tasks.Installers (35)
src\CreateLightCommandPackageDrop.cs (6)
33string packageDropOutputFolder = Path.Combine(LightCommandWorkingDir, Path.GetFileName(InstallerFile)); 55var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(WixProjectFile)); 57commandString.Append($" -wixprojectfile {Path.GetFileName(WixProjectFile)}"); 61commandString.Append($" -contentsfile {Path.GetFileName(ContentsFile)}"); 65commandString.Append($" -outputsfile {Path.GetFileName(OutputsFile)}"); 69commandString.Append($" -builtoutputsfile {Path.GetFileName(BuiltOutputsFile)}");
src\CreateWixBuildWixpack.cs (20)
101_installerFilename = Path.GetFileName(InstallerFile); 114string destPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(projectPath)); 262_defineConstantsDictionary["ProjectPath"] = Path.GetFileName(projectPath); 280_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath)); 284InstallerFile = Path.Combine("%outputfolder%", Path.GetFileName(InstallerFile)); 292PdbFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(PdbFile.ItemSpec)); 298BindTrackingFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(BindTrackingFile.ItemSpec)); 426commandLineArgs.Add($"{Path.GetFileName(sourceFile.ItemSpec)}"); 518var copiedXmlPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(xmlPath)); 597var filePath = Path.Combine(dir, Path.GetFileName(source)); 598CopySourceFile(Path.GetFileName(dir), filePath); 609id = Path.GetFileName(source); 615var newSourceValue = $"{id}\\{Path.GetFileName(source)}"; 653string id = Path.GetFileName(includeFilePath); 666var potentialPath = Path.Combine(WixpackWorkingDir, searchPath, Path.GetFileName(includeFilePath)); 1023var destPath = Path.Combine(destDir, Path.GetFileName(source)); 1038string filename = Path.GetFileName(extensionPath); 1081string filename = Path.GetFileName(localizationPath); 1108File.Copy(file, Path.Combine(destDir, Path.GetFileName(file)), overwrite: true); 1113CopyDirectoryRecursive(dir, Path.Combine(destDir, Path.GetFileName(dir)));
src\CreateWixCommandPackageDropBase.cs (7)
67OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}"); 97commandString.Append($" -out %outputfolder%{Path.GetFileName(InstallerFile)}"); 106commandString.Append($" -loc {Path.GetFileName(locItem.ItemSpec)}"); 120commandString.Append($" {Path.GetFileName(wixSrcFile.ItemSpec)}"); 144string newWixSrcFilePath = Path.Combine(packageDropOutputFolder, Path.GetFileName(wixSrcFile.ItemSpec)); 176var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(locItem.ItemSpec)); 310newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
src\RpmBuilder.cs (2)
413baseNames.Add(Path.GetFileName(file.Name)); 473if (file.Name.StartsWith("usr/share/doc") && Path.GetFileName(file.Name) == "copyright")
Microsoft.DotNet.Build.Tasks.Packaging (15)
CreateTrimDependencyGroups.cs (2)
163string fileName = Path.GetFileName(compileAsset); 165if (!runtimeAssets.Any(r => Path.GetFileName(r).Equals(fileName, StringComparison.OrdinalIgnoreCase)))
GetLayoutFiles.cs (2)
128var destination = Path.Combine(DestinationDirectory, subfolder, Path.GetFileName(source)); 142var symbolDestination = Path.Combine(DestinationDirectory, subfolder, Path.GetFileName(symbolSource));
HarvestPackage.cs (2)
327harvestPackagePath = remappedTargetPath + '/' + Path.GetFileName(packageFile); 339targetPaths.Add(additionalTargetPath + '/' + Path.GetFileName(packageFile));
NuGetAssetResolver.cs (1)
151return Path.GetFileName(path) == PlaceHolderFile;
NuGetPack.cs (2)
391if(Path.GetFileName(fileName) == "runtime.json" && file.Target == "") 393string packedPackageSourcePath = Path.Combine(Path.GetDirectoryName(fileName), string.Join(".", _packageNamePrefix, Path.GetFileName(fileName)));
PackageIndex.cs (1)
205string targetFrameworkMoniker = Path.GetFileName(frameworkDir);
PackageItem.cs (1)
48string sourceFile = Path.GetFileName(SourcePath);
UpdatePackageIndex.cs (2)
210var version = NuGetVersion.Parse(Path.GetFileName(path)); 211var id = Path.GetFileName(Path.GetDirectoryName(path));
ValidatePackage.cs (2)
328string fileName = Path.GetFileName(implementationAssembly.PackagePath); 344Path.GetFileName(i.PackagePath).Equals(fileName, StringComparison.OrdinalIgnoreCase) &&
Microsoft.DotNet.Build.Tasks.Workloads (2)
Wix\WixToolTaskBase.cs (1)
48ToolName = Path.GetFileName(toolPath);
WorkloadPackageBase.cs (1)
246File.Copy(PackagePath, Path.Combine(DestinationDirectory, Path.GetFileName(PackagePath)), overwrite: true);
Microsoft.DotNet.Cli.Definitions (1)
src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs (1)
67if (string.IsNullOrEmpty(dotnetExe) || !Path.GetFileName(dotnetExe)
Microsoft.DotNet.Cli.Utils (2)
Muxer.cs (1)
65if (processPath is not null && !Path.GetFileName(processPath).Equals(muxerFileName, StringComparison.OrdinalIgnoreCase))
PathUtility.cs (1)
19return string.Equals(Path.GetFileName(path), "_._", StringComparison.Ordinal);
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\PinvokeAnalyzer.cs (2)
30_allowedPinvokeFile = obj.Options.AdditionalFiles.FirstOrDefault(f => Path.GetFileName(f.Path).IndexOf("PinvokeAnalyzer_", StringComparison.OrdinalIgnoreCase) >= 0); 31_exceptionFile = obj.Options.AdditionalFiles.FirstOrDefault(f => Path.GetFileName(f.Path).IndexOf("PinvokeAnalyzerExceptionList.analyzerdata", StringComparison.OrdinalIgnoreCase) >= 0);
Microsoft.DotNet.GenFacades (2)
GenPartialFacadeSourceGenerator.cs (2)
38string[] seedNames = distinctSeeds.Select(seed => Path.GetFileName(seed)).ToArray(); 151AddTypeToTable(typeTable, type, Path.GetFileName(assembly));
Microsoft.DotNet.HotReload.Watch (7)
Context\EnvironmentOptions.cs (2)
86Debug.Assert(Path.GetFileName(path) == $"dotnet{PathUtilities.ExecutableExtension}"); 92? $"{Path.Combine(WorkingDirectory, options.BinaryLogPath)[..^".binlog".Length]}-dotnet-watch.{operationName}.{Path.GetFileName(projectPath)}.{Interlocked.Increment(ref _uniqueLogId)}.binlog"
FileWatcher\DirectoryWatcher.cs (1)
32if (watchedFileNames.Count > 0 && !watchedFileNames.Contains(Path.GetFileName(fullPath)))
FileWatcher\FileWatcher.cs (1)
78select (g.Key, containingDirectories ? [] : g.Select(Path.GetFileName).ToImmutableHashSet(PathUtilities.OSSpecificPathComparer));
HotReload\HotReloadDotNetWatcher.cs (2)
617|| string.Equals(Path.GetFileName(filePath), "global.json", PathUtilities.OSSpecificPathComparison); 842=> Path.GetFileName(dir).StartsWith('.');
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (1)
94if (Path.GetFileName(path).Equals(bundleFileName, StringComparison.Ordinal))
Microsoft.DotNet.InternalAbstractions (2)
DirectoryPath.cs (2)
93CopyDirectoryAcrossMounts(dir, Path.Combine(destPath, Path.GetFileName(dir))); 98new FileInfo(file).CopyTo(Path.Combine(destPath, Path.GetFileName(file)), true);
Microsoft.DotNet.NativeWrapper (2)
EnvironmentProvider.cs (1)
67if (string.IsNullOrEmpty(dotnetExe) || !Path.GetFileName(dotnetExe)
src\sdk\src\Common\HostFxrPathResolver.cs (1)
54SemanticVersion.TryParse(Path.GetFileName(path), out SemanticVersion? version);
Microsoft.DotNet.PackageTesting (5)
VerifyClosure.cs (3)
100otherFiles.Add(Path.GetFileName(file)); 107var fileName = Path.GetFileName(assemblyInfo.Path); 108var existingFileName = Path.GetFileName(existingInfo.Path);
VerifyTypes.cs (2)
105var fileName = Path.GetFileName(assemblyInfo.Path); 106var existingFileName = Path.GetFileName(existingInfo.Path);
Microsoft.DotNet.PackageValidation (1)
ApiCompatRunnerExtensions.cs (1)
100return new MetadataInformation(Path.GetFileName(item.Path), item.Path, package.PackagePath, assemblyReferences, displayString);
Microsoft.DotNet.SharedFramework.Sdk (10)
src\arcade\src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (3)
100otherFiles.Add(Path.GetFileName(file)); 107var fileName = Path.GetFileName(assemblyInfo.Path); 108var existingFileName = Path.GetFileName(existingInfo.Path);
src\arcade\src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (2)
105var fileName = Path.GetFileName(assemblyInfo.Path); 106var existingFileName = Path.GetFileName(existingInfo.Path);
src\CreateFrameworkListFile.cs (2)
84Filename = Path.GetFileName(item.ItemSpec), 171new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path))));
src\GeneratePlatformManifestEntriesFromTemplate.cs (1)
32var files = Files.ToLookup(file => Path.GetFileName(file.ItemSpec)).ToDictionary(l => l.Key, l=> l.First());
src\GenerateSharedFrameworkDepsFile.cs (1)
62string fileName = Path.GetFileName(filePath);
src\ValidateFileVersions.cs (1)
30var fileName = Path.GetFileName(file.ItemSpec);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
204string filename = Path.GetFileName(snapshot.Path);
Microsoft.DotNet.TemplateLocator (9)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (8)
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 480string manifestId = Path.GetFileName(manifestDirectory); 491return (directory: dir, version: Path.GetFileName(dir)); 526.Select(dir => Path.GetFileName(dir)) 624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.DotNet.XliffTasks (5)
Tasks\GatherTranslatedSource.cs (1)
66string relativePath = Path.GetFileName(translatedFullPath);
Tasks\GatherXlf.cs (1)
76$"Two or more source files to be translated in the same project are named {Path.GetFileName(sourceDocumentPath)}. " +
Tasks\TransformTemplates.cs (2)
79string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec)); 86File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
Tasks\XlfTask.cs (1)
128return $"../{Path.GetFileName(sourcePath)}";
Microsoft.Extensions.AI (2)
Files\LoggingHostedFileClient.cs (1)
62fileName ??= content is FileStream fs ? Path.GetFileName(fs.Name) : null;
Files\OpenTelemetryHostedFileClient.cs (1)
138fileName ??= content is FileStream fs ? Path.GetFileName(fs.Name) : null;
Microsoft.Extensions.AI.Abstractions (4)
Contents\DataContent.cs (2)
175string? fileName = Path.GetFileName(filePath); 225name = Path.GetFileName(Name);
Files\HostedFileClientExtensions.cs (2)
69string fileName = Path.GetFileName(filePath); 114fileName = Path.GetFileName(downloadStream.FileName);
Microsoft.Extensions.AI.Abstractions.Tests (7)
Contents\DataContentTests.cs (6)
327Assert.Equal(Path.GetFileName(tempPath), content.Name); 354Assert.Equal(Path.GetFileName(tempPath), content.Name); 408Assert.Equal(Path.GetFileName(tempPath), content.Name); 610Assert.Equal(filename, Path.GetFileName(savedPath)); 638Assert.Equal(content.Name, Path.GetFileName(savedPath)); 668Assert.Equal(content.Name, Path.GetFileName(savedPath));
Files\HostedFileClientExtensionsTests.cs (1)
89Assert.Equal(Path.GetFileName(tempFile), capturedFileName);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIHostedFileClient.cs (3)
105fileName ??= content is FileStream fs ? Path.GetFileName(fs.Name) : null; 167string containerFileName = path is not null ? Path.GetFileName(path) : fileId; 345string name = file.Path is { } path ? Path.GetFileName(path) : file.Id;
OpenAISpeechToTextClient.cs (1)
190return Path.GetFileName(fileStream.Name);
Microsoft.Extensions.AI.Templates.Tests (1)
VerifyScrubbers.cs (1)
50if (Path.GetFileName(path).Equals("launchSettings.json", StringComparison.OrdinalIgnoreCase))
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationSource.cs (1)
86Path = System.IO.Path.GetFileName(Path);
Microsoft.Extensions.DependencyModel (4)
DependencyContextJsonReader.cs (2)
808groupRuntimeAssemblies.Where(a => Path.GetFileName(a.Path) != "_._"))); 820groupNativeLibraries.Where(a => Path.GetFileName(a.Path) != "_._")));
Resolution\AppBaseCompilationAssemblyResolver.cs (1)
100string assemblyFile = Path.GetFileName(assembly);
Resolution\ReferenceAssemblyPathResolver.cs (1)
77string name = Path.GetFileName(path);
Microsoft.Extensions.FileProviders.Embedded (2)
EmbeddedFileProvider.cs (2)
117builder.Append(Path.GetFileName(subpath)); 125var name = Path.GetFileName(subpath);
Microsoft.Extensions.FileSystemGlobbing (2)
InMemoryDirectoryInfo.cs (1)
54Name = isParentPath ? ".." : Path.GetFileName(rootDir);
Internal\InMemoryFileInfo.cs (1)
16Name = Path.GetFileName(file);
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
52var file = Path.GetFileName(filePath);
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
37_fileName = Path.GetFileName(filePath);
Microsoft.Gen.MetadataExtractor (1)
ComplianceReportsGenerator.cs (1)
37_fileName = Path.GetFileName(filePath);
Microsoft.Maui.Essentials (2)
FileSystem\FileSystem.shared.cs (2)
195 if (string.IsNullOrWhiteSpace(Path.GetFileName(fullPath))) 271 return Path.GetFileName(FullPath);
Microsoft.Maui.Resizetizer (1)
GetMauiAssetPath.cs (1)
57 path = Path.GetFileName(path);
Microsoft.ML.AutoML.Tests (2)
DatasetUtil.cs (2)
174var label = Path.GetFileName(file); 199destFileName = Path.GetFileName(new Uri(url).AbsolutePath); ;
Microsoft.ML.Core (1)
ComponentModel\AssemblyLoadingUtils.cs (1)
147string name = Path.GetFileName(path).ToLowerInvariant();
Microsoft.ML.Data (1)
Utilities\StreamUtils.cs (1)
133var files = Directory.GetFiles(path, Path.GetFileName(currentPattern)).OrderBy(f => f).ToArray();
Microsoft.ML.PerformanceTests (3)
BenchmarkBase.cs (1)
47var blobName = Path.GetFileName(name);
Harness\ProjectGenerator.cs (1)
54<Compile Include=""{Path.GetFileName(artifactsPaths.ProgramCodePath)}"" Exclude=""bin\**;obj\**;**\*.xproj;packages\**"" />
ImageClassificationBench.cs (1)
112var label = Path.GetFileName(file);
Microsoft.ML.Predictor.Tests (6)
CompareBaselines.cs (6)
58log.WriteLine("Comparison of baselines {0} to {1}", Path.GetFileName(root1), Path.GetFileName(root2)); 70.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false); 73string name = Path.GetFileName(path1); 93.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false); 96string name = Path.GetFileName(path1);
Microsoft.ML.Samples (8)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
179var label = Path.GetFileName(file); 215var label = Path.GetFileName(file);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
207var label = Path.GetFileName(file); 245var label = Path.GetFileName(file);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
170$"[{Path.GetFileName(imageToPredict.ImagePath)}], " + 203var label = Path.GetFileName(file);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
188var label = Path.GetFileName(file); 224var label = Path.GetFileName(file);
Microsoft.ML.Samples.GPU (8)
docs\e4e90a0f3c9b109a\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
207var label = Path.GetFileName(file); 245var label = Path.GetFileName(file);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
179var label = Path.GetFileName(file); 215var label = Path.GetFileName(file);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
170$"[{Path.GetFileName(imageToPredict.ImagePath)}], " + 203var label = Path.GetFileName(file);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
188var label = Path.GetFileName(file); 224var label = Path.GetFileName(file);
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
221var name = Path.GetFileName(errorResult.FileName);
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
1911var label = Path.GetFileName(file);
Microsoft.ML.TestFrameworkCommon (1)
Utility\PathResolver.cs (1)
95if (Path.GetFileName(nativeAsset) == name || Path.GetFileNameWithoutExtension(nativeAsset) == name)
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
277var name = Path.GetFileName(errorResult.FileName);
Roberta\QATrainer.cs (1)
261var name = Path.GetFileName(errorResult.FileName);
TorchSharpBaseTrainer.cs (1)
187var name = Path.GetFileName(errorResult.FileName);
Microsoft.ML.Transforms (1)
Text\WordEmbeddingsExtractor.cs (1)
640var name = Path.GetFileName(errorResult.FileName);
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
420File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
Microsoft.NET.Build.Extensions.Tasks (4)
src\sdk\src\Tasks\Common\ConflictResolution\ConflictItem.cs (1)
125_fileName = OriginalItem == null ? string.Empty : Path.GetFileName(OriginalItem.ItemSpec);
src\sdk\src\Tasks\Common\ItemUtilities.cs (3)
74return Path.GetFileName(sourcePath); 104return targetPath != null ? Path.GetFileName(targetPath) : null; 141var fileName = Path.GetFileName(sourcePath);
Microsoft.NET.Build.Tasks (46)
CheckForUnsupportedWinMDReferences.cs (3)
59if (Path.GetFileName(referencePath.ItemSpec).Equals("System.Runtime.WindowsRuntime.dll", StringComparison.OrdinalIgnoreCase)) 66Log.LogError(Strings.WinMDTransitiveReferenceNotSupported, Path.GetFileName(referencePath.ItemSpec)); 76Log.LogError(Strings.WinMDReferenceNotSupportedOnTargetFramework, TargetFrameworkMoniker, Path.GetFileName(winMDReference.ItemSpec));
DependencyContextBuilder.cs (1)
440resolvedPath = Path.GetFileName(referenceAssembly.FullPath);
FrameworkPackages\FrameworkPackages.cs (3)
135log.LogMessage("Pack directories found: {0}", string.Join(Environment.NewLine, packDirectories.Select(d => Path.Combine(originalPacksFolder, Path.GetFileName(d))))); 137.Select(d => (Overrides: Path.Combine(d, "data", "PackageOverrides.txt"), OriginalOverrides: Path.Combine(originalPacksFolder, Path.GetFileName(d), "data", "PackageOverrides.txt"), Version: ParseVersion(Path.GetFileName(d))))
GenerateDepsFile.cs (1)
270string destinationSubPath = string.IsNullOrEmpty(destinationSubDir) ? null : Path.Combine(destinationSubDir, Path.GetFileName(i.ItemSpec));
ParseTargetManifests.cs (1)
32var targetManifestFileName = Path.GetFileName(manifestFile);
PrepareForReadyToRunCompilation.cs (7)
250r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath)); 259r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath)); 303MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec)); 502bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec))); 503bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R; 504bool partialImage = (partialSet != null && partialSet.Contains(Path.GetFileName(file.ItemSpec))); 508bool rootedInComposite = (r2rCompositeRootSet == null || r2rCompositeRootSet.Contains(Path.GetFileName(file.ItemSpec)));
ProduceContentAssets.cs (1)
252item.SetMetadata("Link", Path.Combine("NuGet", packageName, packageVersion, Path.GetFileName(resolvedPath)));
ReferenceInfo.cs (2)
16public string FileName => Path.GetFileName(FullPath); 169string destinationSubPath = string.IsNullOrEmpty(destinationSubDirectory) ? null : Path.Combine(destinationSubDirectory, Path.GetFileName(fullPath));
ResolvedFile.cs (1)
33get { return Path.GetFileName(SourcePath); }
ResolvePackageAssets.cs (5)
1365WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.Path)); 1688Path.GetFileName(asset.Path), 1706WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.Path)); 1723Path.GetFileName(asset.Path), 2028if (Path.GetFileName(resolvedPackageAssetPath) == apphostName)
ResolveRuntimePackAssets.cs (2)
280assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.GetFileName(assetPath)); 285assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.Combine(culture, Path.GetFileName(assetPath)));
ResolveTargetingPackAssets.cs (2)
313string itemSpec = Path.Combine(targetingPackAssetPath.OriginalValue, Path.GetFileName(dll)); 321if (!Path.GetFileName(dll).Equals("netstandard.dll", StringComparison.OrdinalIgnoreCase))
ResourceAssemblyInfo.cs (1)
26string relativePath = Path.Combine(destinationSubDirectory, Path.GetFileName(referenceSatellitePath.ItemSpec));
RunReadyToRunCompiler.cs (2)
238if (IsPdbCompilation && string.Equals(Path.GetFileName(reference.ItemSpec), Path.GetFileName(_outputR2RImage), StringComparison.OrdinalIgnoreCase))
SingleProjectInfo.cs (1)
90string outputName = Path.GetFileName(projectReferencePath.ItemSpec);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (8)
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 480string manifestId = Path.GetFileName(manifestDirectory); 491return (directory: dir, version: Path.GetFileName(dir)); 526.Select(dir => Path.GetFileName(dir)) 624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
src\sdk\src\Tasks\Common\ConflictResolution\ConflictItem.cs (1)
125_fileName = OriginalItem == null ? string.Empty : Path.GetFileName(OriginalItem.ItemSpec);
src\sdk\src\Tasks\Common\ItemUtilities.cs (3)
74return Path.GetFileName(sourcePath); 104return targetPath != null ? Path.GetFileName(targetPath) : null; 141var fileName = Path.GetFileName(sourcePath);
Microsoft.NET.HostModel (1)
AppHost\HostWriter.cs (1)
126string destinationFileName = Path.GetFileName(appHostDestinationFilePath);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
GenerateBlazorWebAssemblyBootJson50.cs (1)
156result.config.Add(Path.GetFileName(configFile.ItemSpec));
Microsoft.NET.Sdk.Publish.Tasks (11)
MsDeploy\CommonUtility.cs (2)
705strSucceedFailMsg = string.Format(CultureInfo.CurrentCulture, Resources.VSMSDEPLOY_SucceedPackage, Path.GetFileName(destRoot), string.IsNullOrEmpty(dirUri) ? destRoot : dirUri); 781strSucceedFailMsg = string.Format(CultureInfo.CurrentCulture, Resources.VSMSDEPLOY_SucceedPackage, Path.GetFileName(destRoot), string.IsNullOrEmpty(dirUri) ? destRoot : dirUri);
MsDeploy\VsMSDeployObject.cs (1)
98baseOptions.WebServerConfiguration.WebServerManifest = Path.GetFileName(vSMSDeployObject.WebServerManifest);
Tasks\GenerateEnvTransform.cs (1)
43string generatedTransformFileName = Path.Combine(PublishTempDirectory, Path.GetFileName(envTransformTemplatePath));
Tasks\MsDeploy\MSDeploy.cs (1)
1016commandLine.AppendSwitchIfNotNull("-webServerManifest:", Path.GetFileName(WebServerManifest));
Tasks\OneDeploy\OneDeploy.WebJob.cs (1)
39publishUri, username, password, DefaultRequestContentType, userAgent, Path.GetFileName(fileToPublish), Encoding.UTF8, fileToPublishStream, cancellationToken);
Tasks\TransformWebConfig.cs (4)
90publishWebConfigPath = Path.Combine(PublishDir, Path.GetFileName(projectWebConfigPath)); 127string? outputFile = Path.GetFileName(TargetPath) ?? string.Empty; 164.FirstOrDefault(file => string.Equals(Path.GetFileName(file), defaultWebConfigName, StringComparison.OrdinalIgnoreCase)); 165var webConfigFileName = currentWebConfigFileName == null ? defaultWebConfigName : Path.GetFileName(currentWebConfigFileName);
WebJobsCommandGenerator.cs (1)
10string? appName = Path.GetFileName(targetPath);
Microsoft.NET.Sdk.Razor.Tasks (1)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerConnection.cs (1)
295if (exeName.Equals(Path.GetFileName(expectedPath), StringComparison.Ordinal))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (3)
DefineStaticWebAssets.cs (3)
281var fileNamePattern = Path.GetFileName(identity); 417var itemSpecFileName = Path.GetFileName(candidateFullPath); 418var relativeFileName = Path.GetFileName(relativePath);
Microsoft.NET.Sdk.WorkloadManifestReader (9)
SdkDirectoryWorkloadManifestProvider.cs (8)
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 480string manifestId = Path.GetFileName(manifestDirectory); 491return (directory: dir, version: Path.GetFileName(dir)); 526.Select(dir => Path.GetFileName(dir)) 624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (3)
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
22.Select(path => new SdkFeatureBand(Path.GetFileName(path))); 36.Select(file => new WorkloadId(Path.GetFileName(file)));
WorkloadSdkResolver.cs (1)
50var sdkVersion = Path.GetFileName(sdkDirectory);
Microsoft.TemplateEngine.Core (2)
Util\Orchestrator.cs (2)
126string fileName = Path.GetFileName(sourceRel); 197string fileName = Path.GetFileName(sourceRel);
Microsoft.TemplateEngine.Edge (2)
Settings\Scanner.cs (1)
203string targetPath = Path.Combine(targetBasePath, Path.GetFileName(sourceLocation));
Settings\SettingsFilePaths.cs (1)
129return Path.GetFileName(path);
Microsoft.TemplateEngine.Utils (4)
InMemoryFileSystem.cs (2)
22_root = new FileSystemDirectory(Path.GetFileName(root.TrimEnd('/', '\\')), root); 26_root = new FileSystemDirectory(Path.GetFileName(newRoot.TrimEnd('/', '\\')), newRoot);
InstallRequestPathResolution.cs (1)
65string searchPattern = Path.GetFileName(searchTarget);
PhysicalFileSystem.cs (1)
128FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
Microsoft.TestPlatform.CoreUtilities (1)
Helpers\DotnetHostHelper.cs (1)
140if (Path.GetFileName(currentProcessFileName) == _muxerName)
Microsoft.TestPlatform.CrossPlatEngine (3)
DataCollection\InProcDataCollector.cs (1)
75if (Path.GetFileName(codeBase) == Constants.CoverletDataCollectorCodebase)
PostProcessing\ArtifactProcessingManager.cs (2)
234.Select(file => new { TestSessionId = Path.GetFileName(Path.GetDirectoryName(file)), Artifact = file }) 244return Path.GetFileName(fileName) switch
Microsoft.TestPlatform.PlatformAbstractions (1)
common\Tracing\PlatformEqtTrace.cs (1)
400processName = Path.GetFileName(args[0]);
Microsoft.TestPlatform.Utilities (1)
InferRunSettingsHelper.cs (1)
687var onlyFileName = Path.GetFileName(source);
Microsoft.VisualBasic.Core (10)
Microsoft\VisualBasic\CompilerServices\IOUtils.vb (1)
33FileName = Path.GetFileName(PathName)
Microsoft\VisualBasic\FileIO\FileSystem.vb (7)
223Return IO.Path.GetFileName(path) 1041CopyOrMoveFile(Operation, SubFilePath, IO.Path.Combine(SourceDirectoryNode.TargetPath, IO.Path.GetFileName(SubFilePath)), 1497Debug.Assert(DInfo.GetFiles(IO.Path.GetFileName(FullPath)).Length = 1, "Must found exactly 1") 1498Return DInfo.GetFiles(IO.Path.GetFileName(FullPath))(0).FullName 1500Debug.Assert(DInfo.GetDirectories(IO.Path.GetFileName(FullPath)).Length = 1, 1502Return DInfo.GetDirectories(IO.Path.GetFileName(FullPath))(0).FullName 2103Dim SubTargetDirPath As String = IO.Path.Combine(m_TargetPath, IO.Path.GetFileName(SubDirPath))
Microsoft\VisualBasic\FileSystem.vb (2)
366If Path.GetFileName(PathName).Length = 0 Then 392FileName = Path.GetFileName(PathName)
Microsoft.VisualStudio.TestPlatform.Common (1)
DataCollection\DataCollectionAttachmentManager.cs (1)
252var localFilePath = Path.Combine(directoryPath, Path.GetFileName(fileTransferInfo.FileName));
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (5)
TrxLogger.cs (1)
589filePath = Path.Combine(_testResultsDirPath, Path.GetFileName(logFileNameValue!));
Utility\Converter.cs (4)
466string targetFileName = TrxFileHelper.GetNextIterationFileName(targetDirectory, Path.GetFileName(sourceFile), false); 474string fileName = Path.Combine(Environment.MachineName, Path.GetFileName(targetFileName)); 521string targetFileName = TrxFileHelper.GetNextIterationFileName(testResultDirectory, Path.GetFileName(sourceFile), false); 529string fileName = Path.Combine(Environment.MachineName, Path.GetFileName(targetFileName));
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
Navigation\DiaSession.cs (1)
119? Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(pdbFilePath)!)
TestCase.cs (1)
190source = Path.GetFileName(source);
MSBuild (1)
src\msbuild\src\Shared\TypeLoader.cs (1)
310assembliesDictionary[Path.GetFileName(path)] = path;
NuGet.Build.Tasks (3)
BuildTasksUtility.cs (1)
264FileUtility.Delete(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath))));
RestoreSettingsUtils.cs (1)
59var configFileName = Path.GetFileName(configFileFullPath);
RestoreTask.cs (1)
326restoredProjectOutputPaths.Add(new TaskItem(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1494LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
NuGet.Build.Tasks.Pack (6)
PackTaskLogic.cs (6)
542targetPath = Path.GetFileName(finalOutputPath); 716var fileName = Path.GetFileName(sourcePath); 764!Path.GetFileName(sourcePath) 778else if (identity.EndsWith(Path.GetFileName(sourcePath), StringComparison.CurrentCultureIgnoreCase)) 802var fileName = Path.GetFileName(sourcePath); 829sourcePath = Path.Combine(sourceProjectFile.Replace(Path.GetFileName(sourceProjectFile), string.Empty), identity);
NuGet.CommandLine.XPlat (2)
Commands\PackageReferenceCommands\ListPackage\ListPackageCommand.cs (1)
265var configFileName = Path.GetFileName(configFileFullPath);
Utility\XPlatUtility.cs (1)
73var configFileName = Path.GetFileName(configFileFullPath);
NuGet.Commands (24)
CommandRunners\PackCommandRunner.cs (3)
571WriteLine(Strings.Log_PackageCommandAttemptingToBuildSymbolsPackage, Path.GetFileName(path)); 706var fileName = Path.GetFileName(filePath); 953!Path.GetFileName(ext).Equals(ProjectJsonPathUtilities.ProjectConfigFileName, StringComparison.OrdinalIgnoreCase) &&
MSBuildProjectFactory.cs (4)
196? Path.Combine(target, Path.GetFileName(sourcePath)) 210includePath = Path.Combine(includePath, Path.GetFileName(sourcePath)); 258var projectName = Path.GetFileName(projectDirectory); 285var finalTargetPath = Path.Combine(targetPath, Path.GetFileName(sourcePath));
RestoreCommand\ContentFiles\ContentFileUtils.cs (1)
229destination = Path.GetFileName(lockFileItem.Path);
RestoreCommand\RequestFactory\RestoreArgs.cs (1)
96var configFileName = Path.GetFileName(configFileFullPath);
RestoreCommand\Utility\BuildAssetsUtils.cs (3)
180var resolvableAssetsFilePath = @"$(MSBuildThisFileDirectory)" + Path.GetFileName(assetsFilePath); 433var projFileName = Path.GetFileName(project.RestoreMetadata.ProjectPath); 448var projFileName = Path.GetFileName(project.RestoreMetadata.ProjectPath);
RestoreCommand\Utility\LockFileUtils.cs (9)
312if (Path.GetFileName(btItem.Path).Equals(Path.GetFileName(buildItem.Path), StringComparison.OrdinalIgnoreCase)) 450lockFileLib.RuntimeAssemblies = lockFileLib.RuntimeAssemblies.Where(p => !p.Path.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.Path))).ToList(); 451lockFileLib.CompileTimeAssemblies = lockFileLib.CompileTimeAssemblies.Where(p => !p.Path.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.Path))).ToList(); 878Path.GetFileName(c.Path), 889Path.GetFileName(c.Path), 979var fileName = Path.GetFileName(firstItem.Path); 1235item => Path.GetFileName(item.Path).Equals(Path.GetFileName(currentBuildItem.Path), StringComparison.OrdinalIgnoreCase));
RestoreCommand\Utility\NoOpRestoreUtilities.cs (1)
209var projFileName = Path.GetFileName(request.Project.RestoreMetadata.ProjectPath);
SignCommand\SignCommandRunner.cs (1)
127outputPath = Path.Combine(outputDirectory, Path.GetFileName(packagePath));
SourcesCommands\SourceRunners.cs (1)
343var configFileName = Path.GetFileName(configFileFullPath);
NuGet.Common (3)
LocalResourceUtils.cs (1)
104var filePath = Path.Combine(folderPath, Path.GetFileName(file));
PathUtil\ProjectJsonPathUtilities.cs (2)
118var file = Path.GetFileName(configPath); 147file = Path.GetFileName(configPath);
NuGet.Configuration (4)
Settings\Items\FileClientCertItem.cs (1)
38return new SettingsFile(Path.GetDirectoryName(settingsFilePath)!, Path.GetFileName(settingsFilePath), isMachineWide: false, isReadOnly: false);
Settings\Settings.cs (2)
708fileName = Path.GetFileName(settingsPath); 714fileName = Path.GetFileName(fullPath);
Utility\FileSystemUtility.cs (1)
57return String.Equals(path, Path.GetFileName(path), StringComparison.OrdinalIgnoreCase);
NuGet.Credentials (2)
PluginCredentialProvider.cs (1)
59var filename = System.IO.Path.GetFileName(path);
PluginCredentialProviderBuilder.cs (1)
78.SelectMany(g => g.OrderBy(Path.GetFileName, StringComparer.OrdinalIgnoreCase))
NuGet.PackageManagement (21)
BuildIntegration\DependencyGraphRestoreUtility.cs (1)
277var projFileName = Path.GetFileName(packageSpec.RestoreMetadata.ProjectPath);
Projects\MSBuildNuGetProject.cs (6)
321var referenceName = Path.GetFileName(referenceItem); 372ProjectSystem.AddExistingFile(Path.GetFileName(PackagesConfigNuGetProject.FullPath)); 522ProjectSystem.RemoveFile(Path.GetFileName(PackagesConfigNuGetProject.FullPath)); 526ProjectSystem.AddExistingFile(Path.GetFileName(PackagesConfigNuGetProject.FullPath)); 537await ProjectSystem.RemoveReferenceAsync(Path.GetFileName(item)); 616var fileName = Path.GetFileName(filePath);
Projects\PackagesConfigNuGetProject.cs (4)
125nuGetProjectContext.Log(MessageLevel.Warning, Strings.PackageAlreadyExistsInPackagesConfig, packageIdentity, Path.GetFileName(FullPath)); 181nuGetProjectContext.Log(MessageLevel.Info, Strings.AddedPackageToPackagesConfig, packageIdentity, Path.GetFileName(FullPath)); 202nuGetProjectContext.Log(MessageLevel.Warning, Strings.PackageDoesNotExisttInPackagesConfig, packageIdentity, Path.GetFileName(FullPath)); 235nuGetProjectContext.Log(MessageLevel.Info, Strings.RemovedPackageFromPackagesConfig, packageIdentity, Path.GetFileName(FullPath));
Utility\FileSystemUtility.cs (8)
72|| string.IsNullOrEmpty(Path.GetFileName(path))) 100nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_AddedFileToFolder, Path.GetFileName(path), folderPath); 104nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_AddedFile, Path.GetFileName(path)); 127if (string.IsNullOrEmpty(Path.GetFileName(fullPath))) 142if (string.IsNullOrEmpty(Path.GetFileName(fullPath))) 155|| string.IsNullOrEmpty(Path.GetFileName(fullPath))) 230Path.GetFileName(fullPath), 235nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_RemovedFile, Path.GetFileName(fullPath));
Utility\MSBuildNuGetProjectSystemUtility.cs (2)
514PackagingCoreConstants.EmptyFolder.Equals(Path.GetFileName(packageFilePath), StringComparison.OrdinalIgnoreCase); 570var fileName = Path.GetFileName(truncatedPath);
NuGet.Packaging (19)
PackageCreation\Authoring\PackageBuilder.cs (3)
506select Path.GetFileName(file.Path), StringComparer.OrdinalIgnoreCase); 997searchFiles.RemoveAll(file => Path.GetFileName(file.TargetPath) == PackagingConstants.PackageEmptyFileName 1060packagePath = Path.GetFileName(fullPath);
PackageExtraction\PackageHelper.cs (1)
55|| string.IsNullOrEmpty(Path.GetFileName(packageFileName)))
PackageExtraction\StreamExtensions.cs (1)
75if (Path.GetFileName(fileFullPath).Length == 0)
PackageExtractor.cs (7)
494var hashFileName = Path.GetFileName(hashPath); 495var nupkgMetadataFileName = Path.GetFileName(nupkgMetadataFilePath); 794var nuspecFileName = Path.GetFileName(targetNuspec); 795var actualNuspecFileName = Path.GetFileName(extractedNuspecFilePath); 814var hashFileName = Path.GetFileName(hashPath); 815var nupkgMetadataFileName = Path.GetFileName(nupkgMetadataFilePath); 904var fileName = Path.GetFileName(fullName);
PackageFileExtractor.cs (1)
112var entry = zipArchive.CreateEntry(Path.GetFileName(source));
PackageReaderBase.cs (2)
295var file = Path.GetFileName(path); 496var file = Path.GetFileName(path);
Rules\InitScriptNotUnderToolsRule.cs (2)
24var name = Path.GetFileName(file); 25var dirName = Path.GetFileName(Path.GetDirectoryName(file))!;
Rules\InvalidPlaceholderFileRule.cs (1)
26if (Path.GetFileName(file).Equals(PackagingCoreConstants.EmptyFolder, StringComparison.Ordinal))
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (1)
57.GroupBy(t => NuGetFramework.ParseFolder(t.Split('/')[1]).GetShortFolderName(), t => Path.GetFileName(t));
NuGet.ProjectModel (1)
ToolPathResolver.cs (1)
113var version = Path.GetFileName(versionDirectory);
NuGet.Protocol (6)
Plugins\PluginDiscoveryUtility.cs (1)
91var expectedPluginName = Path.Combine(pluginDirectory, Path.GetFileName(pluginDirectory) + ".dll");
Plugins\PluginPackageReader.cs (1)
853var file = Path.GetFileName(path);
Resources\PackageUpdateResource.cs (4)
236Path.GetFileName(symbolPackagePath), 327Path.GetFileName(symbolPackagePath), 367Path.GetFileName(packageToPush), 894var idDirectoryName = Path.GetFileName(idDirectory);
Pipelines.AppHost (2)
AppHost.cs (2)
265.CreateTaskAsync($"Uploading {Path.GetFileName(sourcePath)} to {fileShareName}", deployingContext.CancellationToken) 309var fileName = Path.GetFileName(filePath);
PresentationBuildTasks (5)
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
373relPath = Path.GetFileName(fullFilePath);
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
358return Path.Combine(_backupPath, Path.ChangeExtension(Path.GetFileName(fileName), "uidtemp")); 363return Path.Combine(_backupPath, Path.ChangeExtension(Path.GetFileName(fileName), "uidbackup"));
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
3349resourceId = Path.GetFileName(fullFilePath);
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
500relContentFilePath = Path.GetFileName(fullPath);
PresentationFramework (4)
Microsoft\Win32\FileDialog.cs (2)
112string safeFN = Path.GetFileName(CriticalItemName); 143safeFileNames[i] = Path.GetFileName(unsafeFileNames[i]);
Microsoft\Win32\OpenFolderDialog.cs (2)
99string safeFN = Path.GetFileName(CriticalItemName); 130safeFolderNames[i] = Path.GetFileName(unsafeFolderNames[i]);
PresentationUI (1)
MS\Internal\Documents\Application\DocumentProperties.cs (1)
98_filename = Path.GetFileName(_uri.LocalPath);
RepoTasks (1)
BatchHelixWorkItems.cs (1)
117var destPath = Path.Combine(batchDirectory, Path.GetFileName(file));
Roslyn.Diagnostics.Analyzers (9)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
188/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> doesn't check for invalid path characters.</remarks>
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (2)
101_poolName = Path.GetFileName(filePath) + ":" + lineNumber; 117_poolName = Path.GetFileName(filePath) + ":" + lineNumber;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
174? $" (allocated at {Path.GetFileName(group.Key.FilePath)}:{group.Key.LineNumber})"
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (2)
43=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 51=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
rzc (4)
ServerProtocol\ServerConnection.cs (1)
295if (exeName.Equals(Path.GetFileName(expectedPath), StringComparison.Ordinal))
ShadowCopyManager.cs (3)
42var destination = Path.Combine(assemblyDirectory, Path.GetFileName(filePath)); 51var directoryName = Path.GetFileName(directory); 146if (!Mutex.TryOpenExisting(Path.GetFileName(directory).ToLowerInvariant(), out mutex))
sdk-tasks (10)
Crossgen.cs (2)
48TempOutputPath = Path.Combine(tempDirPath, Path.GetFileName(DestinationPath)); 59File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), overwrite: true);
GenerateMSBuildExtensionsSWR.cs (3)
46if (files.Any(f => !Path.GetFileName(f).Equals("_._"))) 55sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file))); 71string subfolderName = Path.GetFileName(subfolder);
GenerateRuntimeAnalyzersSWR.cs (3)
81!Path.GetFileName(f).Equals("_._"); 92var fileName = Path.GetFileName(file); 117string subfolderName = Path.GetFileName(subfolder);
ReplaceFilesWithSymbolicLinks.cs (1)
79string fileName = Path.GetFileName(file);
TarGzFileCreateFromDirectory.cs (1)
102var sourceDirectoryName = Path.GetFileName(Path.GetDirectoryName(SourceDirectory));
SelectTests (2)
GraphAffectedProjects.cs (2)
140trace?.Processing($"build MSBuild ProjectGraph from {Path.GetFileName(solutionPath)}"); 227["SolutionFileName"] = Path.GetFileName(solutionPath),
System.CommandLine (1)
Parsing\StringExtensions.cs (1)
287var potentialRootCommand = Path.GetFileName(args[0]);
System.CommandLine.StaticCompletions (1)
ShellName.cs (1)
34var shellName = Path.GetFileName(shellPath);
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
98string fileName = Path.GetFileName(location);
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\PerformanceCounterLib.cs (1)
428iniWriter.WriteLine(Path.GetFileName(SymbolFilePath));
System.Diagnostics.Process (3)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
66module = new ProcessModule(parsedLine.Path, Path.GetFileName(parsedLine.Path))
System\Diagnostics\ProcessManager.Linux.cs (2)
137string dirName = Path.GetFileName(taskDir); 179string dirName = Path.GetFileName(procDir);
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\TextWriterTraceListener.cs (1)
229string fileNameOnly = Path.GetFileName(fullPath);
System.Formats.Tar (1)
System\Formats\Tar\TarWriter.cs (1)
394string? actualEntryName = string.IsNullOrEmpty(entryName) ? Path.GetFileName(fileName) : entryName;
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
210if (Path.GetFileName(fileDestinationPath).Length == 0)
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
302string name = System.IO.Path.GetFileName(directoryPath);
System.IO.IsolatedStorage (6)
System\IO\IsolatedStorage\Helper.cs (2)
71if (Path.GetFileName(directory)?.Length == 12) 75if (Path.GetFileName(subdirectory)?.Length == 12)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (3)
177return Directory.EnumerateFiles(RootDirectory, searchPattern).Select(f => Path.GetFileName(f)).ToArray(); 716private static bool IsIdFile(string file) => string.Equals(Path.GetFileName(file), "identity.dat"); 718private static bool IsInfoFile(string file) => string.Equals(Path.GetFileName(file), "info.dat");
System\IO\IsolatedStorage\IsolatedStorageFile.NonMobile.cs (1)
64string directoryName = Path.GetFileName(directory);
System.IO.Packaging (1)
System\IO\Packaging\PackUriHelper.cs (1)
207string file = Path.GetFileName(partName);
System.Net.Mail (3)
System\Net\Mail\Attachment.cs (3)
296Name = Path.GetFileName(fileName); 303Name = Path.GetFileName(fileName); 312Name = Path.GetFileName(fileName);
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
507"Content-Disposition: form-data; name=\"file\"; filename=\"" + Path.GetFileName(fileName) + "\"\r\n" + // TODO: Should the filename path be encoded?
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (2)
32public override string Name => _name ??= Path.GetFileName(OriginalPath); 195_name = Path.GetFileName(fullDestFileName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (1)
191=> GetAttributes(handle, handle.Path, Path.GetFileName(handle.Path), continueOnError);
System.Reflection.Metadata (1)
System\Reflection\Internal\Utilities\PathUtilities.cs (1)
48/// <remarks>Unlike <see cref="System.IO.Path.GetFileName(string)"/> this method doesn't check for invalid path characters.</remarks>
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\CodeExporter.cs (1)
123string assemblyName = System.IO.Path.GetFileName(assembly.Location);
System.Windows.Forms (6)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
407string themeFilename = Path.GetFileName(VisualStyles.VisualStyleInformation.ThemeFilename);
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1)
1373string themeFileName = Path.GetFileName(VisualStyleInformation.ThemeFilename);
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
377string folder = Path.GetFileName(selectedPath);
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (2)
180public string SafeFileName => Path.GetFileName(FileName) ?? string.Empty; 197safePaths[i] = Path.GetFileName(fullPaths[i]);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
902caption = Path.GetFileName(PInvoke.GetModuleFileNameLongPath(HINSTANCE.Null));
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
76image.Name = Path.GetFileName(name);
TypeScriptApiCompat (3)
ApiCompatSuppression.cs (2)
110var fileName = Path.GetFileName(file); 120var name = Path.GetFileName(childDirectory);
AtsSurface.cs (1)
67var fileName = Path.GetFileName(filePath);
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
317return System.IO.Path.GetFileName(sb.ToString().ToLower(CultureInfo.InvariantCulture));
VBCSCompiler (5)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (5)
253.Select(d => (Path: d, Name: Path.GetFileName(d))) 490var dllName = Path.GetFileName(dllDir); 494var dirName = Path.GetFileName(entryDir); 623var dllName = Path.GetFileName(dllDir); 627var dirName = Path.GetFileName(entryDir);
vstest.console (2)
Internal\ConsoleLogger.cs (1)
779var sourceName = Path.GetFileName(sd.Key);
TestPlatformHelpers\TestRequestManager.cs (1)
1557if (KnownPlatformSources.Contains(Path.GetFileName(source)))
vstest.console.arm64 (2)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
779var sourceName = Path.GetFileName(sd.Key);
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (1)
1557if (KnownPlatformSources.Contains(Path.GetFileName(source)))