1184 references to GetFileName
Aspire.Dashboard (2)
Model\ResourceSourceViewModel.cs (2)
22return CreateResourceSourceViewModel(Path.GetFileName(projectPath), projectPath, commandLineInfo); 27return CreateResourceSourceViewModel(Path.GetFileName(executablePath), executablePath, commandLineInfo);
Aspire.EndToEnd.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
251_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 (7)
ApplicationModel\AspireStore.cs (1)
43filenameTemplate = Path.GetFileName(filenameTemplate);
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
145var fileName = Path.GetFileName(relativePath); 204Name = Path.GetFileName(fullPath),
Dashboard\DashboardEventHandlers.cs (3)
128var fileName = Path.GetFileName(assemblyPath); 200var fileName = Path.GetFileName(dashboardPath); 302var fileName = Path.GetFileName(fullyQualifiedDashboardPath);
Dcp\DcpExecutor.cs (1)
2327Name = Path.GetFileName(bundlePath),
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
235sourcePath = Path.Combine(OutputPath, composeService.Name, Path.GetFileName(file.SourcePath));
Aspire.Templates.Tests (5)
TemplateTestsBase.cs (1)
77var appHostProjectName = Path.GetFileName(project.AppHostProjectDirectory)!;
tests\Shared\TemplatesTesting\AspireProject.cs (1)
251_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))}");
AspireWithNode.AppHost (2)
DevCertHostingExtensions.cs (2)
44var certFileName = Path.GetFileName(certPath); 45var certKeyFileName = Path.GetFileName(certKeyPath);
BuildActionTelemetryTable (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
BuildBoss (7)
CompilerNuGetCheckerUtil.cs (2)
104var packageFileName = Path.GetFileName(packageFullPath); 431var fileName = Path.GetFileName(filePath);
Extensions.cs (1)
25internal static string GetName(this PackagePart part) => Path.GetFileName(GetRelativeName(part));
ProjectData.cs (1)
19internal string FileName => Path.GetFileName(FilePath);
ProjectKey.cs (1)
16internal string FileName => FilePath != null ? Path.GetFileName(FilePath) : "";
StructuredLoggerCheckerUtil.cs (1)
37if (doubleWrites.Any(doubleWrite => Path.GetFileName(doubleWrite.Key) != "Microsoft.VisualStudio.Text.Internal.dll"))
TargetsCheckerUtil.cs (1)
28var fileName = Path.GetFileName(filePath);
BuildValidator (5)
CompilationDiff.cs (2)
305var sourceFilePath = Path.Combine(sourcesPath, Path.GetFileName(tree.FilePath)); 405writer.WriteLine($@"\t""{Path.GetFileName(info.SourceTextInfo.OriginalSourceFilePath)}"" - {hashString}");
LocalReferenceResolver.cs (1)
124if (Path.GetFileName(filePath) != metadataReferenceInfo.FileName)
Records.cs (2)
12internal string FileName => Path.GetFileName(FilePath); 13internal string TargetFramework => Path.GetFileName(Path.GetDirectoryName(FilePath))!;
ClientSample (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
CodeStyleConfigFileGenerator (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Crossgen2Tasks (5)
PrepareForReadyToRunCompilation.cs (3)
233MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec)); 387bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec))); 388bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R;
RunReadyToRunCompiler.cs (2)
232if (IsPdbCompilation && string.Equals(Path.GetFileName(reference.ItemSpec), Path.GetFileName(_outputR2RImage), StringComparison.OrdinalIgnoreCase))
CSharpSyntaxGenerator (1)
Program.cs (1)
143var prefix = Path.GetFileName(inputFile);
dotnet (51)
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)
34var exeName = Path.GetFileName(result.GetValue(InternalReportInstallSuccessCommandParser.Argument));
Commands\New\BuiltInTemplatePackageProvider.cs (1)
79if (SemanticVersion.TryParse(Path.GetFileName(directory), out SemanticVersion versionInfo))
Commands\New\OptionalWorkloadProvider.cs (1)
37var sdkVersion = Path.GetFileName(sdkDirectory);
Commands\New\SdkInfoProvider.cs (2)
49sdks = NETCoreSdkResolverNativeWrapper.GetAvailableSdks(dotnetDir).Select(Path.GetFileName); 56sdks = Directory.Exists(sdkDir) ? Directory.GetDirectories(sdkDir).Select(Path.GetFileName).Where(IsValidFxVersion) : [];
Commands\Project\Convert\ProjectConvertCommand.cs (1)
41var targetFile = Path.Join(targetDirectory, Path.GetFileName(file));
Commands\Solution\Add\SolutionAddCommand.cs (2)
169string projectFileName = Path.GetFileName(solutionRelativeProjectPath); 179p => IsInSameFolderHierarchy(p.Parent, rootFolder) && Path.GetFileName(p.FilePath).Equals(projectFileName, StringComparison.OrdinalIgnoreCase));
Commands\Test\MTP\MSBuildHandler.cs (1)
115string.Join(Environment.NewLine, vsTestTestProjects.Select(module => Path.GetFileName(module.ProjectFullPath))).Red().Bold()));
Commands\Test\MTP\SolutionAndProjectUtility.cs (3)
227Logger.LogTrace($"Loaded project '{Path.GetFileName(projectFilePath)}' with TargetFramework '{targetFramework}', TargetFrameworks '{targetFrameworks}', IsTestProject '{projectInstance.GetPropertyValue(ProjectProperties.IsTestProject)}', and '{ProjectProperties.IsTestingPlatformApplication}' is '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}'."); 257Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}')."); 271Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
19public string AssemblyName { get; } = Path.GetFileName(assembly)!;
Commands\Workload\Install\FileBasedInstaller.cs (12)
406var installedSdkFeatureBands = NETCoreSdkResolverNativeWrapper.GetAvailableSdks(_dotnetDir).Select(sdkDir => new SdkFeatureBand(Path.GetFileName(sdkDir))).ToHashSet(); 663var extractionPath = Path.Combine(_tempPackagesDir.Value, "dotnet-sdk-advertising-temp", $"{Path.GetFileName(nupkgPath)}-extracted"); 755var workloadSetVersion = Path.GetFileName(workloadSetVersionDir); 758var workloadSetFeatureBand = new SdkFeatureBand(Path.GetFileName(workloadSetFeatureBandDir)); 761var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord)); 806var manifestId = new ManifestId(Path.GetFileName(manifestIdDir)); 809var manifestVersion = new ManifestVersion(Path.GetFileName(manifestVersionDir)); 812var manifestFeatureBand = new SdkFeatureBand(Path.GetFileName(manifestFeatureBandDir)); 815var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord)); 848var packId = new WorkloadPackId(Path.GetFileName(packIdDir)); 851var packVersion = Path.GetFileName(packVersionDir); 854var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(bandRecord));
Commands\Workload\Install\NetSdkMsiInstallerClient.InstallRecords.cs (3)
138if (!ReleaseVersion.TryParse(Path.GetFileName(manifestFeatureBandFolder), out ReleaseVersion releaseVersion)) 153var lowerCasedManifestID = Path.GetFileName(manifestIDFolder); 158string manifestVersionString = Path.GetFileName(manifestVersionFolder);
Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
22.Select(path => new SdkFeatureBand(Path.GetFileName(path))); 36.Select(file => new WorkloadId(Path.GetFileName(file)));
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
326Path.GetFileName(path).StartsWith(manifestPackageId.ToString(), StringComparison.OrdinalIgnoreCase) &&
Installer\Windows\InstallerBase.cs (1)
99protected static string SdkDirectory => Path.GetFileName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
Installer\Windows\MsiPackageCache.cs (3)
68string msiPath = Path.Combine(Path.GetDirectoryName(manifestPath), Path.GetFileName(msiManifest.Payload)); 70string cachedMsiPath = Path.Combine(packageDirectory, Path.GetFileName(msiPath)); 71string cachedManifestPath = Path.Combine(packageDirectory, Path.GetFileName(manifestPath));
Installer\Windows\MsiPayload.cs (1)
48public string Name => Path.GetFileName(MsiPath);
NugetPackageDownloader\NuGetPackageDownloader.cs (3)
321(Path.GetFileName(p) == Path.GetFileNameWithoutExtension(p)); 341allowListNuspec.Contains(Path.GetFileName(f), comparer: StringComparer.OrdinalIgnoreCase))) 381string 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))
Telemetry\PersistenceChannel\StorageTransmission.cs (1)
20FileName = Path.GetFileName(fullPath);
ToolPackage\ToolPackageInstance.cs (1)
106.Select(path => NuGetFramework.ParseFolder(Path.GetFileName(path))).ToList();
ToolPackage\ToolPackageStoreAndQuery.cs (3)
27Path.GetFileName( 66var name = Path.GetFileName(subdirectory); 93version: NuGetVersion.Parse(Path.GetFileName(subdirectory)),
dotnet.Tests (17)
CommandFactoryTests\GivenAnAppBaseCommandResolver.cs (2)
149var commandFile = Path.GetFileName(result.Path); 174var commandFile = Path.GetFileName(result.Path);
CommandFactoryTests\GivenAProjectPathCommandResolver.cs (3)
156var commandFileName = Path.GetFileName(result.Path); 204var commandFile = Path.GetFileName(result.Path); 230var commandFile = Path.GetFileName(result.Path);
CommandFactoryTests\GivenAProjectToolsCommandResolver.cs (1)
246.FirstOrDefault(p => Path.GetFileName(p).EndsWith(FileNameSuffixes.DepsJson));
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (1)
44Path.GetFileName(dotnetProjectConvertProject).Should().Be("Program.csproj");
CommandTests\Run\RunFileTests.cs (3)
305var dirName = Path.GetFileName(testInstance.Path); 804var dirName = Path.GetFileName(testInstance.Path); 2519Path.GetFileName(f) != programName && // binary on unix
CommandTests\Workload\Install\GivenDotnetWorkloadInstall.cs (1)
457featureBandRecords.Select(recordPath => Path.GetFileName(recordPath))
CommandTests\Workload\Restore\DiscoverAllProjectsTests.cs (6)
23result.Should().Contain(f => Path.GetFileName(f) == "App.csproj"); 43result.Should().Contain(f => Path.GetFileName(f) == "App.csproj", "from checking the sln file"); 44result.Should().Contain(f => Path.GetFileName(f) == "Lib.csproj", "from directly pass in"); 58result.Should().Contain(f => Path.GetFileName(f) == "First.csproj"); 59result.Should().Contain(f => Path.GetFileName(f) == "Second.csproj"); 78result.Should().Contain(f => Path.GetFileName(f) == "App.csproj", "from checking the sln file");
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-format (3)
Formatters\OrganizeImportsFormatter.cs (1)
57logger.LogWarning(Resources.Unable_to_organize_imports_for_0_The_document_is_too_complex, Path.GetFileName(document.FilePath));
Utilities\GeneratedCodeUtilities.cs (1)
40var fileName = Path.GetFileName(filePath);
Workspaces\MSBuildWorkspaceFinder.cs (1)
67throw new FileNotFoundException(string.Format(Resources.The_file_0_does_not_appear_to_be_a_valid_project_or_solution_file, Path.GetFileName(workspacePath)));
dotnet-format.UnitTests (8)
Analyzers\AnalyzerAssemblyGenerator.cs (1)
45references.AddRange(netcoreMetadataReferences.Where(reference => Path.GetFileName(reference.Display) != "System.Collections.Immutable.dll"));
MSBuild\MSBuildWorkspaceFinderTests.cs (6)
79var solutionFileName = System.IO.Path.GetFileName(workspacePath); 93var solutionFileName = System.IO.Path.GetFileName(workspacePath); 105var solutionFileName = System.IO.Path.GetFileName(workspacePath); 117var solutionFileName = System.IO.Path.GetFileName(workspacePath); 131var solutionFileName = System.IO.Path.GetFileName(workspacePath); 145var solutionFileName = System.IO.Path.GetFileName(workspacePath);
MSBuild\MSBuildWorkspaceLoaderTests.cs (1)
169var projectName = Path.GetFileName(projectPath);
dotnet-getdocument (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-MsiInstallation.Tests (5)
Framework\VMTestBase.cs (2)
34foreach (var file in sdkTestingDir.Files.Select(f => Path.GetFileName(f))) 118foreach (var file in sdkTestingDir.Files.Select(Path.GetFileName))
MsiInstallerTests.cs (3)
330var manifestFeatureBand = Path.GetFileName(manifestFeatureBandPath); 339var manifestId = Path.GetFileName(manifestIdPath); 348var manifestVersion = Path.GetFileName(manifestVersionPath);
dotnet-new.IntegrationTests (4)
BaseIntegrationTest.cs (1)
144string testProject = Path.GetFileName(DotnetNewTestTemplatePackageProjectPath);
DotnetNewInstantiateTests.Approval.cs (1)
382.UseMethodName($"CanInstantiateTemplate_ConditionalProcessing_{Path.GetFileName(file)}")
SourcesTests.cs (2)
29Directory.EnumerateFiles(workingDirectory, "*", SearchOption.AllDirectories).Select(Path.GetFileName).OrderBy(s => s)); 40Directory.EnumerateFiles(workingDirectory, "*", SearchOption.AllDirectories).Select(Path.GetFileName).OrderBy(s => s));
dotnet-openapi (2)
Commands\BaseCommand.cs (1)
372var fileName = Path.GetFileName(contentDisposition.FileName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
174string filename = Path.GetFileName(path);
dotnet-svcutil-lib (23)
CommandProcessorOptions.cs (4)
486var updateFileName = Path.GetFileName(this.UpdateServiceReferenceFolder); 500var paramsFiles = jsonFiles.Except(excludeJsonFiles).Where(fn => Path.GetFileName(fn).Equals(CommandProcessorOptions.SvcutilParamsFileName, RuntimeEnvironmentHelper.FileStringComparison) || 501Path.GetFileName(fn).Equals(CommandProcessorOptions.WCFCSParamsFileName, RuntimeEnvironmentHelper.FileStringComparison)); 545if (Path.GetFileName(paramsFilePath).Equals(CommandProcessorOptions.WCFCSParamsFileName))
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), 895var targetLib = Path.GetFileName(this._resolvedProperties["TargetPath"].Trim('\"')); 912if (!Path.GetFileName(assetPath).Equals(targetLib, RuntimeEnvironmentHelper.FileStringComparison)) 1005.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-user-jwts (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-watch (5)
CommandLine\EnvironmentOptions.cs (1)
82? $"{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)
77select (g.Key, containingDirectories ? [] : g.Select(path => Path.GetFileName(path)).ToImmutableHashSet(PathUtilities.OSSpecificPathComparer));
HotReload\HotReloadDotNetWatcher.cs (1)
720=> Path.GetFileName(dir).StartsWith('.');
Watch\MsBuildFileSetFactory.cs (1)
72Logger.LogError("Error(s) finding watch items project file '{FileName}'.", Path.GetFileName(rootProjectFile));
dotnet-watch.Tests (2)
CommandLine\ProgramTests.cs (1)
328if (Path.GetFileName(path) == "App.WithDeps.csproj")
TestUtilities\DebugTestOutputLogger.cs (1)
14=> WriteLine($"[TEST {Path.GetFileName(testPath)}:{testLine}] {message}");
EndToEnd.Tests (4)
GivenSelfContainedAppsRollForward.cs (2)
24string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj"); 51string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
ProjectBuildTests.cs (1)
407int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
VersionTests.cs (1)
20var expectedSdkVersion = Path.GetFileName(sdkFolders.Single());
finalizer (2)
Program.cs (2)
244string? subKeyName = Path.GetFileName(name.TrimEnd(Path.DirectorySeparatorChar)); 265subKeyName = Path.GetFileName(tempName.TrimEnd(Path.DirectorySeparatorChar));
GenerateAnalyzerNuspec (2)
Program.cs (2)
161var directoryName = Path.GetFileName(directory); 212var fileName = Path.GetFileName(file);
GetDocument.Insider (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
HelixTasks (4)
AssemblyScheduler.cs (2)
29DisplayName = Path.GetFileName(assemblyPath); 143var assemblyName = Path.GetFileName(_assemblyPath);
SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs (1)
121string assemblyName = Path.GetFileName(targetPath);
TarGzFileCreateFromDirectory.cs (1)
122var sourceDirectoryName = Path.GetFileName(Path.GetDirectoryName(SourceDirectory));
HelixTestRunner (7)
ProcessUtil.cs (2)
108process.StartInfo.EnvironmentVariables["COMPlus_DbgMiniDumpName"] = Path.Combine(dumpDirectoryPath, $"{Path.GetFileName(filename)}.%d.dmp"); 181var dumpFilePath = Path.Combine(dumpDirectoryPath, $"{Path.GetFileName(filename)}.{process.Id}.dmp");
TestRunner.cs (5)
89ProcessUtil.PrintMessage(Path.GetFileName(file)); 93ProcessUtil.PrintMessage(Path.GetFileName(file)); 315var logName = $"{Path.GetFileName(Path.GetDirectoryName(file))}_{Path.GetFileName(file)}"; 329var fileName = Path.GetFileName(file);
HttpStress (2)
Program.cs (2)
374Console.WriteLine(" .NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(object).Assembly.Location))); 375Console.WriteLine(" ASP.NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(IWebHostBuilder).Assembly.Location)));
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (1)
78var name = Path.GetFileName(file);
illink (1)
ILLink.Tasks (1)
LinkTask.cs (1)
259protected override string ToolName => Path.GetFileName(DotNetPath);
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);
InteractiveHost.UnitTests (7)
InteractiveHostCoreInitTests.cs (1)
86await Host.AddReferenceAsync(Path.GetFileName(dll.Path));
InteractiveHostDesktopInitTests.cs (1)
59await Host.AddReferenceAsync(Path.GetFileName(dll.Path));
InteractiveHostDesktopTests.cs (5)
723{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 803$@"{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 831{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 853$@"{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 1038{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))}
Metrics (12)
MetricsOutputWriter.cs (1)
43writer.WriteAttributeString("Name", Path.GetFileName(filePath));
Program.cs (5)
303Console.WriteLine($"Loading {Path.GetFileName(projectFile)}..."); 310Console.WriteLine($"Computing code metrics for {Path.GetFileName(projectFile)}..."); 329Console.WriteLine($"Loading {Path.GetFileName(solutionFile)}..."); 336Console.WriteLine($"Computing code metrics for {Path.GetFileName(solutionFile)}..."); 343Console.WriteLine($" Computing code metrics for {Path.GetFileName(project.FilePath)}...");
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
Metrics.Legacy (12)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
src\RoslynAnalyzers\Tools\Metrics\MetricsOutputWriter.cs (1)
43writer.WriteAttributeString("Name", Path.GetFileName(filePath));
src\RoslynAnalyzers\Tools\Metrics\Program.cs (5)
303Console.WriteLine($"Loading {Path.GetFileName(projectFile)}..."); 310Console.WriteLine($"Computing code metrics for {Path.GetFileName(projectFile)}..."); 329Console.WriteLine($"Loading {Path.GetFileName(solutionFile)}..."); 336Console.WriteLine($"Computing code metrics for {Path.GetFileName(solutionFile)}..."); 343Console.WriteLine($" Computing code metrics for {Path.GetFileName(project.FilePath)}...");
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\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.Arcade.Common (2)
FileSystem.cs (1)
21public string? GetFileName(string? path) => Path.GetFileName(path);
ZipArchiveManager.cs (1)
30string entryName = Path.GetFileName(filePath);
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
47public string? GetFileName(string? path) => Path.GetFileName(path);
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticVerifier.cs (2)
194var dll = Path.Combine(Directory.GetCurrentDirectory(), "refs", Path.GetFileName(assembly)); 201dll = Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(assembly));
Microsoft.AspNetCore.App.UnitTests (3)
TargetingPackTests.cs (3)
127Assert.True(result, $"In {Path.GetFileName(path)}, {reference.GetAssemblyName()} has unexpected version {reference.Version}."); 248var fileName = Path.GetFileName(i); 431string expectedLanguage = Path.GetFileName(Path.GetDirectoryName(assemblyPath));
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Builder\TestFileProvider\TestFileProvider.cs (2)
45Name = Path.GetFileName(path), 56var directoryContent = new TestDirectoryContent(Path.GetFileName(path), files);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
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.Test (1)
StaticContentProviderTests.cs (1)
119public string Name => Path.GetFileName(_filePath);
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\Shared\ErrorPage\ErrorPage.Designer.cs (2)
348Write(System.IO.Path.GetFileName(firstFrame.File)); 549Write(System.IO.Path.GetFileName(frame.File));
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
422var dll = Path.Combine(Directory.GetCurrentDirectory(), "refs", Path.GetFileName(assembly)); 430dll = Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(assembly));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
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)
423Path.GetFileName(contentRootAttribute.ContentRootTest)); 531Path.GetFileName(depsFile.FullName)));
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
TestFileProvider.cs (2)
45Name = Path.GetFileName(path), 56var directoryContent = new TestDirectoryContent(Path.GetFileName(path), files);
Microsoft.AspNetCore.OpenApi.Build.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
ResponseSendFileTests.cs (1)
31RelativeFilePath = Path.GetFileName(AbsoluteFilePath);
Microsoft.AspNetCore.Server.IIS (2)
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.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
1084public string Name => Path.GetFileName(testResource.Path);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (2)
StaticFileMiddlewareTests.cs (2)
158var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 200var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl));
Microsoft.AspNetCore.StaticFiles.Tests (7)
StaticFileMiddlewareTests.cs (7)
72var response = await server.CreateClient().GetAsync(Path.GetFileName(badLink)); 185var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 224var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 266var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 316var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 359var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 478var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
BrowserRefreshMiddleware.cs (1)
140!string.Equals(Path.GetFileName(request.Path.Value), "blazor.boot.json", StringComparison.OrdinalIgnoreCase))
Microsoft.Build (28)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
518string lastDirectoryName = Path.GetFileName(path.TrimEnd(Path.DirectorySeparatorChar));
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
75checkContext.DispatchFailedAcquisitionTelemetry(System.IO.Path.GetFileName(checkAcquisitionData.AssemblyPath), ex);
BuildCheck\Checks\CopyAlwaysCheck.cs (1)
84Path.GetFileName(context.Data.ProjectFilePath),
BuildCheck\Checks\EmbeddedResourceCheck.cs (1)
79Path.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 (4)
1022string escapedSolutionFileName = EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath)); 1726lastFolderInPhysicalPath = Path.GetFileName(aspNetPhysicalPath); 2295globalProperties.AddProperty("SolutionFileName", EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath))); 2298globalProperties.AddProperty(SolutionPathPropertyName, EscapingUtilities.Escape(Path.Combine(_solutionFile.SolutionFileDirectory, Path.GetFileName(_solutionFile.FullPath))));
Definition\ToolsetReader.cs (1)
196var version = Path.GetFileName(d);
ElementLocation\XmlDocumentWithLocation.cs (1)
356if (Path.GetFileName(fullPath).StartsWith("Microsoft.", StringComparison.OrdinalIgnoreCase))
Evaluation\Expander\WellKnownFunctions.cs (1)
132returnVal = Path.GetFileName(arg0);
Evaluation\Profiler\EvaluationLocationPrettyPrinterBase.cs (1)
101evaluationLocation.File == null ? string.Empty : System.IO.Path.GetFileName(evaluationLocation.File),
FrameworkLocationHelper.cs (1)
829string leaf = Path.GetFileName(currentRuntimePath);
Graph\GraphBuilder.cs (2)
303solutionGlobalPropertiesBuilder["SolutionFileName"] = EscapingUtilities.Escape(Path.GetFileName(Solution.FullPath)); 305solutionGlobalPropertiesBuilder[SolutionProjectGenerator.SolutionPathPropertyName] = EscapingUtilities.Escape(Path.Combine(Solution.SolutionFileDirectory, Path.GetFileName(Solution.FullPath)));
Instance\TaskRegistry.cs (1)
1286!FileClassifier.IsMicrosoftAssembly(Path.GetFileName(_taskFactoryAssemblyLoadInfo.AssemblyFile)) &&
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
76Path.GetFileName(logFilePath),
TypeLoader.cs (2)
200assembliesDictionary.Add(Path.GetFileName(localPath), localPath); 205assembliesDictionary[Path.GetFileName(runtimeAssembly)] = runtimeAssembly;
Utilities\FileSpecMatchTester.cs (1)
89string filename = Path.GetFileName(normalizedFileToMatch);
Microsoft.Build.BuildCheck.UnitTests (8)
EndToEndTests.cs (8)
548$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore" + 587$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore {(checkRequested ? "-check" : string.Empty)} -bl:{logFile}", 638$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", 701$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -bl:{logFile}", 752$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output, timeoutMilliseconds: timeoutInMilliseconds); 788$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output, timeoutMilliseconds: timeoutInMilliseconds); 812$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check" + 935$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -t:restore -check",
Microsoft.Build.CommandLine.UnitTests (5)
MSBuildServer_Tests.cs (2)
120watcher.Filter = Path.GetFileName(markerFile.Path); 200watcher.Filter = Path.GetFileName(markerFile.Path);
XMake_Tests.cs (3)
2974if (Path.GetFileName(d).Equals("TestTemp", StringComparison.InvariantCultureIgnoreCase)) 2983File.Copy(file, Path.Combine(dest, Path.GetFileName(file))); 2988string dirName = Path.GetFileName(directory);
Microsoft.Build.Engine.OM.UnitTests (3)
Definition\ProjectItem_Tests.cs (3)
1998Assert.Equal(Path.GetFileName(sourceFile), projectItem.EvaluatedInclude); 2000projectItem.Rename(Path.GetFileName(renamedSourceFile)); 2004Assert.Equal(Path.GetFileName(renamedSourceFile), projectItem.EvaluatedInclude);
Microsoft.Build.Engine.UnitTests (30)
BackEnd\BuildManager_Tests.cs (1)
3527var resultsFiles = Directory.EnumerateFiles(directory).Select(Path.GetFileName);
BackEnd\LoggingServicesLogMethod_Tests.cs (4)
829message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithTargetNames", Path.GetFileName(projectFile), targetNames); 833message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", Path.GetFileName(projectFile)); 1401string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(success ? "ProjectFinishedSuccess" : "ProjectFinishedFailure", Path.GetFileName(projectFile)); 1491string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(succeeded ? "TargetFinishedSuccess" : "TargetFinishedFailure", targetName, Path.GetFileName(projectFile));
BackEnd\MSBuild_Tests.cs (1)
60string fileName = Path.GetFileName(tempProject);
BackEnd\TaskBuilder_Tests.cs (1)
642string fileName = Path.GetFileName(realTaskPath);
BuildEnvironmentHelper_Tests.cs (1)
183Path.GetFileName(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath).ShouldBe(MSBuildExeName);
Construction\SolutionFile_OldParser_Tests.cs (2)
320Project('{F14B399A-7131-4C87-9E4B-1186C45EF12D}') = 'RptProj', '" + Path.GetFileName(rptprojPath) + @"', '{CCCCCCCC-9925-4D57-9DAF-E0A9D936ABDB}' 324Project('{D2ABAB84-BF74-430A-B69E-9DC6D40DDA17}') = 'DwProj', '" + Path.GetFileName(dqprojPath) + @"', '{DEA89696-F42B-4B58-B7EE-017FF40817D1}'
Construction\SolutionFilter_Tests.cs (10)
244Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build"", """ + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)) + @""", ""{69BE05E2-CBDA-4D27-9733-44E12B0F5627}"" 246Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""MSBuild"", """ + Path.Combine("src", Path.GetFileName(msbuild.Path)) + @""", ""{6F92CA55-1D15-4F34-B1FE-56C0B7EB455E}"" 248Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.CommandLine.UnitTests"", """ + Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)) + @""", ""{0ADDBC02-0076-4159-B351-2BF33FAA46B2}"" 250Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.Tasks.UnitTests"", """ + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)) + @""", ""{CF999BDE-02B3-431B-95E6-E88D621D9CBF}"" 270""" + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!).Replace("\\", "\\\\") + @""", 271""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!).Replace("\\", "\\\\") + @""" 276sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!)).ShouldBeTrue(); 277sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!)).ShouldBeTrue(); 280(sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)!)) 281|| sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(msbuild.Path)!))
Construction\SolutionProjectGenerator_Tests.cs (2)
2620ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"), 2679ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
Definition\ToolsVersion_Tests.cs (2)
960Path.GetFileName(path); 976return !sameFolder || !Regex.IsMatch(Path.GetFileName(candidate), finalPattern);
Evaluation\Expander_Tests.cs (2)
3385string tempFile = Path.GetFileName(FileUtilities.GetTemporaryFile()); 3427pg.Set(ProjectPropertyInstance.Create("FileToFind", Path.GetFileName(fileToFind)));
FileMatcher_Tests.cs (1)
2178string baseMatch = Path.GetFileName(normalizedCandidate.Substring(0, nextSlash));
Graph\IsolateProjects_Tests.cs (1)
453var file = Path.GetFileName(path);
ProjectCache\ProjectCacheTests.cs (1)
884itemResult.GetMetadata("File").ShouldBe(Path.GetFileName(projectPath));
TypeLoader_Tests.cs (1)
104string newAssemblyLocation = Path.Combine(folder.Path, Path.GetFileName(currentAssembly));
Microsoft.Build.Framework (4)
Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
ProjectFinishedEventArgs.cs (1)
115RawMessage = FormatResourceStringIgnoreCodeAndKeyword(Succeeded ? "ProjectFinishedSuccess" : "ProjectFinishedFailure", Path.GetFileName(ProjectFile));
ProjectStartedEventArgs.cs (1)
543string? projectFilePath = Path.GetFileName(ProjectFile);
TargetFinishedEventArgs.cs (1)
182RawMessage = FormatResourceStringIgnoreCodeAndKeyword(Succeeded ? "TargetFinishedSuccess" : "TargetFinishedFailure", targetName, Path.GetFileName(projectFile));
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
SdkIntegrationTests.cs (1)
123Assert.True(compilations[0].SyntaxTrees.Any(x => Path.GetFileName(x.FilePath) == "hello.cs"));
TestUtilities\DotNetSdkTestBase.cs (1)
210var projectFileName = Path.GetFileName(projectFilePath);
Microsoft.Build.Tasks.Core (33)
AddToWin32Manifest.cs (1)
139SaveManifest(document, Path.GetFileName(ApplicationManifest?.ItemSpec) ?? DefaultManifestName);
AssemblyDependency\ReferenceTable.cs (2)
982string cultureName = Path.GetFileName(subDirectory); 2821referenceItem.SetMetadata(ItemMetadataNames.winmdImplmentationFile, Path.GetFileName(reference.ImplementationAssembly));
AssignTargetPath.cs (1)
117targetPath = Path.GetFileName(Files[i].ItemSpec);
Copy.cs (2)
776() => Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec)), 803string srcName = Path.GetFileName(src);
CreateCSharpManifestResourceName.cs (1)
207manifestName.Append(Path.GetFileName(info.cultureNeutralFilename));
CreateManifestResourceName.cs (1)
178string conventionDependentUpon = Path.ChangeExtension(Path.GetFileName(fileName), SourceFileExtension);
CreateVisualBasicManifestResourceName.cs (1)
193manifestName.Append(Path.GetFileName(info.cultureNeutralFilename));
DownloadFile.cs (1)
326: Path.GetFileName(requestUri.LocalPath); // Otherwise attempt to get a file name from the URI
FileMatcher.cs (2)
535longParts[i - startingElement] = Path.GetFileName(longPath); 1665return IsMatch(Path.GetFileName(path), pattern);
FindAppConfigFile.cs (1)
124string filename = (matchWholeItemSpec ? item.ItemSpec : Path.GetFileName(item.ItemSpec));
FindInList.cs (1)
108string filename = (MatchFileNameOnly ? Path.GetFileName(path) : path);
GenerateApplicationManifest.cs (1)
233name = Path.GetFileName(item.ItemSpec);
GenerateLauncher.cs (1)
67string entryPointFileName = Path.GetFileName(EntryPoint.ItemSpec);
GenerateManifestBase.cs (3)
541file.TargetPath = Path.IsPathRooted(file.SourcePath) || file.SourcePath.StartsWith("..", StringComparison.Ordinal) ? Path.GetFileName(file.SourcePath) : file.SourcePath; 592string manifestFileName = Path.GetFileName(OutputManifest.ItemSpec); 628Util.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)
37string launcherFilename = Path.GetFileName(LauncherPath);
ManifestUtil\Manifest.cs (2)
512string fileName = Path.GetFileName(f.ResolvedPath); 540f.TargetPath = BaseReference.GetDefaultTargetPath(Path.GetFileName(f.ResolvedPath));
ManifestUtil\ManifestReader.cs (1)
27string manifestFileName = Path.GetFileName(path);
Move.cs (1)
133destinationFile = Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec));
NativeMethods.cs (2)
1389var assemblyName = Path.GetFileName(dir); 1394var versionString = Path.GetFileName(version);
ResolveCodeAnalysisRuleSet.cs (1)
80if (CodeAnalysisRuleSet == Path.GetFileName(CodeAnalysisRuleSet))
ResolveManifestFiles.cs (2)
291targetPath = Path.GetFileName(item.ItemSpec); 369targetPath = Path.GetFileName(item.ItemSpec);
SystemState.cs (1)
459string filename = Path.GetFileName(path);
Unzip.cs (1)
180if (Path.GetFileName(destinationPath.FullName).Length == 0)
Microsoft.Build.Tasks.UnitTests (51)
Copy_Tests.cs (12)
953string destination1 = Path.Combine(destinationFolder, Path.GetFileName(source1)); 954string destination2 = Path.Combine(destinationFolder, Path.GetFileName(source2)); 1846string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 1918string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 2020filesActuallyCopied.Select(f => Path.GetFileName(f.Key.Name)).ShouldBe(new[] { "a.cs", "b.cs" }, ignoreOrder: true); 2550string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 2620string destFile1 = Path.Combine(destFolder, Path.GetFileName(sourceFile1)); 2621string destFile2 = Path.Combine(destFolder, Path.GetFileName(sourceFile2)); 2724string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 2806string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 2872string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile)); 2984Path.Combine(Path.GetDirectoryName(sourceFile2.Path), ".", Path.GetFileName(sourceFile2.Path))) // sourceFile2.Path with a "." inserted before the file name
CreateCSharpManifestResourceName_Tests.cs (2)
492ITaskItem i = new TaskItem(Path.GetFileName(resXFile.Path)); 557ITaskItem i = new TaskItem(Path.GetFileName(resXFile.Path));
GetSDKReference_Tests.cs (30)
436Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec), true); 445Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec), true); 454Assert.Equal("A.winmd", Path.GetFileName(t.CopyLocalFiles[0].ItemSpec), true); 463Assert.Equal("E.dll", Path.GetFileName(t.CopyLocalFiles[5].ItemSpec), true); 472Assert.Equal("B.xml", Path.GetFileName(t.CopyLocalFiles[2].ItemSpec)); 557Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec), true); 566Assert.Equal("B.winmd", Path.GetFileName(t.References[1].ItemSpec), true); 575Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec), true); 684Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 691Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 730Assert.Equal("A.dll", Path.GetFileName(t.References[0].ItemSpec), true); 737Assert.Equal("h.dll", Path.GetFileName(t.References[4].ItemSpec), true); 826Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 835Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 878Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 887Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 963Assert.Equal("A.dll", Path.GetFileName(t.RedistFiles[0].ItemSpec)); 969Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[1].ItemSpec), true); 975Assert.Equal("B.PRI", Path.GetFileName(t.RedistFiles[2].ItemSpec), true); 981Assert.Equal("C.dll", Path.GetFileName(t.RedistFiles[3].ItemSpec), true); 987Assert.Equal("D.dll", Path.GetFileName(t.RedistFiles[4].ItemSpec), true); 1369Assert.Equal("A.dll", Path.GetFileName(t.RedistFiles[0].ItemSpec), true); 1375Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[1].ItemSpec), true); 1381Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[2].ItemSpec), true); 1387Assert.Equal("B.pri", Path.GetFileName(t.RedistFiles[3].ItemSpec), true); 1393Assert.Equal("B.PRI", Path.GetFileName(t.RedistFiles[4].ItemSpec), true); 1399Assert.Equal("C.dll", Path.GetFileName(t.RedistFiles[5].ItemSpec), true); 1405Assert.Equal("D.dll", Path.GetFileName(t.RedistFiles[6].ItemSpec), true); 1414if (Path.GetFileName(path).Equals("C.winmd", StringComparison.OrdinalIgnoreCase)) 1430if (Path.GetFileName(path).Equals("A.winmd", StringComparison.OrdinalIgnoreCase))
Move_Tests.cs (1)
682string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
MSBuild_Tests.cs (1)
62string fileName = Path.GetFileName(tempProject);
ProjectExtensionsPropsImportTest.cs (2)
15protected override string CustomImportProjectPath => Path.Combine(ObjectModelHelpers.TempProjectDir, "obj", $"{Path.GetFileName(_projectRelativePath)}.custom.props"); 17protected override string ImportProjectPath => Path.Combine(Path.GetDirectoryName(_projectRelativePath), "obj", $"{Path.GetFileName(_projectRelativePath)}.custom.props");
ProjectExtensionsTargetsImportTest.cs (2)
15protected override string CustomImportProjectPath => Path.Combine(ObjectModelHelpers.TempProjectDir, "obj", $"{Path.GetFileName(_projectRelativePath)}.custom.targets"); 17protected override string ImportProjectPath => Path.Combine(Path.GetDirectoryName(_projectRelativePath), "obj", $"{Path.GetFileName(_projectRelativePath)}.custom.targets");
WriteCodeFragment_Tests.cs (1)
153string fileName = Path.GetFileName(file.Path);
Microsoft.Build.Utilities.Core (4)
FileMatcher.cs (1)
535longParts[i - startingElement] = Path.GetFileName(longPath);
FrameworkLocationHelper.cs (1)
829string leaf = Path.GetFileName(currentRuntimePath);
ToolTask.cs (1)
536bool isOnlyFileName = Path.GetFileName(pathToTool).Length == pathToTool.Length;
TrackedDependencies\TrackedDependencies.cs (1)
40string searchPattern = Path.GetFileName(item.ItemSpec);
Microsoft.Build.Utilities.UnitTests (2)
ToolTask_Tests.cs (2)
77protected override string ToolName => Path.GetFileName(_fullToolName); 1026protected override string ToolName => Path.GetFileName(_pathToShell);
Microsoft.Cci.Extensions (3)
HostEnvironment.cs (3)
99string fileName = Path.GetFileName(location); 749else if (Path.GetFileName(resolvedPath).Contains('*')) 756files = Directory.EnumerateFiles(Path.GetDirectoryName(resolvedPath), Path.GetFileName(resolvedPath));
Microsoft.CodeAnalysis (13)
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)
1262emitOptions = emitOptions.WithPdbFilePath(Path.GetFileName(emitOptions.PdbFilePath));
Compilation\DeterministicKeyBuilder.cs (1)
52filePath = Path.GetFileName(filePath);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
307var assemblyFileName = Path.GetFileName(assemblyFilePath);
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
124string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 189var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 203var satelliteFileName = Path.GetFileName(satelliteFilePath); 204var 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\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
60var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Analyzers (15)
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\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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\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 (6)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\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.BannedApiAnalyzers (7)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
SymbolIsBannedAnalyzer.cs (1)
60let fileName = Path.GetFileName(additionalFile.Path)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
77var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
Microsoft.CodeAnalysis.Collections.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Contracts.Package (1)
Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.CSharp (1)
Utilities\InterceptableLocation.cs (1)
106var displayFileName = Path.GetFileName(_path);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (30)
CommandLineIVTTests.cs (8)
44var outputFilePath = $"{Path.GetFileName(dir.Path)}{Path.DirectorySeparatorChar}{Path.GetFileName(source2.Path)}"; 121var outputFilePath = $"{Path.GetFileName(dir.Path)}{Path.DirectorySeparatorChar}{Path.GetFileName(source2.Path)}"; 200var outputFilePath = $"{Path.GetFileName(dir.Path)}{Path.DirectorySeparatorChar}{Path.GetFileName(source2.Path)}"; 285var outputFilePath = $"{Path.GetFileName(dir.Path)}{Path.DirectorySeparatorChar}{Path.GetFileName(source2.Path)}";
CommandLineTests.cs (22)
2543var name = Path.GetFileName(file); 5975Assert.Equal("error CS7041: Each linked resource and module must have a unique filename. Filename '" + Path.GetFileName(modfile) + "' is specified more than once in this assembly", outWriter.ToString().Trim()); 7808Path.GetFileName(sourceFile.Path), 7818string.Format("/win32manifest:{0}", Path.GetFileName(manifestFile.Path)), 7819Path.GetFileName(sourceFile.Path), 8016outWriter.ToString().Replace(Path.GetFileName(src.Path), "{FILE}").Trim()); 8397var fileName = Path.GetFileName(source); 8455CleanupAllGeneratedFiles(Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(source)), Path.GetFileName(source))); 8534var fileName = Path.GetFileName(source); 8539Assert.Equal(Path.GetFileName(source) + "(7,17): warning CS1634: Expected 'disable' or 'restore'", outWriter.ToString().Trim()); 8573var fileName = Path.GetFileName(source); 8597var fileName = Path.GetFileName(source); 8631var fileName = Path.GetFileName(source); 8651var fileName = Path.GetFileName(source); 8676var fileName = Path.GetFileName(source); 8703var fileName = Path.GetFileName(source); 8857AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 8914AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 8955AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 10057string fileName = Path.GetFileName(filePath); 12244var fileName = Path.GetFileName(filePath); 14237options: TestOptions.DebugDll.WithCryptoKeyFile(Path.GetFileName(snk.Path)).WithStrongNameProvider(virtualSnProvider),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
91var windowsFolderName = Path.GetFileName(normalizedWindowsPath);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Attributes\InternalsVisibleToAndStrongNameTests.cs (5)
135string keyFileName = Path.GetFileName(s_keyPairFile); 164string keyFileName = Path.GetFileName(s_keyPairFile); 224string keyFileName = Path.GetFileName(s_keyPairFile); 292string keyFileName = Path.GetFileName(s_keyPairFile); 334string publicKeyFileName = Path.GetFileName(s_publicKeyFile);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
1239string libFileName = Path.GetFileName(file.Path);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
3444context.AddSource(Path.GetFileName(text.Path), "");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
DocumentationComments\DocumentationCommentCompilerTests.cs (2)
8359string fileName = Path.GetFileName(fullPath); 8400string xmlFilePath = Path.GetFileName(xmlFile.Path);
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.EditorFeatures (2)
Interactive\InteractiveSession.cs (1)
250Path.GetFileName(initializationScriptPath),
Peek\PeekHelpers.cs (1)
19var fileName = Path.GetFileName(filePath);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\EditorTestWorkspace.cs (1)
536ChangedSourceGeneratedDocumentFileNames.Add(Path.GetFileName(document.FilePath));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
UnusedReferences\UnusedReferencesRemoverTests.cs (3)
183itemSpecification: Path.GetFileName(assemblyPath), 192itemSpecification: Path.GetFileName(assemblyPath), 201itemSpecification: Path.GetFileName(assemblyPath),
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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)
270var fileName = filePath == null ? null : IOUtilities.PerformIO(() => Path.GetFileName(filePath)) ?? filePath;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
362Path.GetFileName(fileInfo.TemporaryFilePath),
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
51var filePath = Path.Combine(tempFilePath, Path.GetFileName(sourceDocument.FilePath)); 132var relativePath = Path.GetFileName(sourceDocument.FilePath);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
104telemetryMessage.SetDll(Path.GetFileName(dllPath)); 348name: Path.GetFileName(info.FilePath),
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
77var 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.InteractiveHost (3)
Interactive\Core\InteractiveHost.Service.cs (1)
522Console.Out.WriteLine(string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(initializationFilePath)));
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.LanguageServer (8)
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
157Pattern = Path.GetFileName(filePath)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (1)
107_watcher = new FileSystemWatcher(directoryPath, Path.GetFileName(filePath));
HostWorkspace\LanguageServerProjectLoader.cs (2)
390var projectName = Path.GetFileName(projectPath); 403message = string.Format(LanguageServerResources.There_were_problems_loading_project_0_See_log_for_details, Path.GetFileName(projectPath));
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
153return VsReferenceHashingAlgorithm.HashInput($"Filename: {Path.GetFileName(projectToLoad.Path)}\n{content}");
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (1)
64var projectFileName = Path.GetFileName(projectPath);
LanguageServer\Handler\Restore\RestoreHandler.cs (1)
70var stageName = string.Format(LanguageServerResources.Restoring_0, Path.GetFileName(path));
Testing\RunTestsHandler.cs (1)
127var projectFileName = Path.GetFileName(document.Project.FilePath);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\Extensions\VSLocation.cs (1)
24/// This doesn't have to correspond to a real file path, but must be parsable by the <see cref="System.IO.Path.GetFileName(string)" /> method.
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\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.PooledObjects.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.PublicApiAnalyzers (7)
PublicApiFile.cs (1)
16var fileName = Path.GetFileName(path);
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\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.Rebuild.UnitTests (1)
RebuildCommandLineTests.cs (1)
111Path.GetFileName(peFilePath),
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteAnalyzerPathResolver.cs (1)
20=> Path.GetFullPath(Path.Combine(_baseDirectory, Path.GetFileName(analyzerPath)));
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\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.ResxSourceGenerator.UnitTests (4)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (2)
91expectedNames.Add(Path.GetFileName(tree.FilePath)); 138var name = Path.GetFileName(tree.FilePath);
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (2)
76expectedNames.Add(Path.GetFileName(tree.FilePath)); 123var name = Path.GetFileName(tree.FilePath);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
410string shadowCopyPath = Path.Combine(assemblyCopyDir, Path.GetFileName(originalPath)); 546string assemblyFileName = Path.GetFileName(originalAssemblyPath);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
151AssertEx.SetEqual(new[] { "MultiModule.dll", "mod2.netmodule", "mod3.netmodule" }, scFiles.Select(p => Path.GetFileName(p)));
Microsoft.CodeAnalysis.Test.Utilities (7)
Assert\ArtifactUploadUtil.cs (2)
84var fileName = Path.GetFileName(filePath); 91var destDirectory = Path.Combine(uploadDir, Path.GetFileName(directory));
Metadata\IlasmUtilities.cs (1)
84Path.ChangeExtension(Path.GetFileName(sourceFile.Path), "dll"));
SharedResourceHelpers.cs (2)
23if (System.IO.Path.GetFileName(f) != System.IO.Path.GetFileName(filename))
TempFiles\TempDirectory.cs (1)
80string filePath = System.IO.Path.Combine(_path, name ?? System.IO.Path.GetFileName(originalPath));
TempFiles\TempFile.cs (1)
35prefix = System.IO.Path.GetFileName(callerSourcePath) + "_" + callerLineNumber.ToString() + "_";
Microsoft.CodeAnalysis.Threading.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.UnitTests (2)
AnalyzerAssemblyLoaderTests.cs (1)
457var cultureInfo = CultureInfo.GetCultureInfo(Path.GetFileName(assemblyDir));
ShadowCopyAnalyzerPathResolverTests.cs (1)
104File.WriteAllText(filePath, $"{Path.GetFileName(groupName)}-{name}");
Microsoft.CodeAnalysis.Workspaces (10)
Shared\TestHooks\AsynchronousOperationListener+DiagnosticAsyncToken.cs (1)
32public override string ToString() => $"{Name} {Path.GetFileName(FilePath)} {LineNumber}";
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
307var assemblyFileName = Path.GetFileName(assemblyFilePath);
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
124string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 189var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 203var satelliteFileName = Path.GetFileName(satelliteFilePath); 204var satelliteDirectoryName = Path.GetFileName(Path.GetDirectoryName(satelliteFilePath));
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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 (3)
MSBuild\ProjectFile\ProjectFile.cs (1)
238=> !Path.GetFileName(item.ItemSpec).StartsWith("TemporaryGeneratedFile_", StringComparison.Ordinal);
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (11)
MSBuildWorkspaceTestBase.cs (1)
132Assert.Equal("EmittedCSharpProject.dll", Path.GetFileName(p1.OutputFilePath));
VisualStudioMSBuildWorkspaceTests.cs (9)
86var fileNames = new HashSet<string>(references.Select(r => Path.GetFileName(((PortableExecutableReference)r).FilePath))); 252Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.OutputFilePath)); 253Assert.Equal("VisualBasicProject.dll", Path.GetFileName(p2.OutputFilePath)); 267Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.CompilationOutputInfo.AssemblyPath)); 268Assert.Equal("VisualBasicProject.dll", Path.GetFileName(p2.CompilationOutputInfo.AssemblyPath)); 322Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.OutputFilePath)); 1559await AssertCSCompilationOptionsAsync("snKey.snk", options => Path.GetFileName(options.CryptoKeyFile)); 3207project.MetadataReferences.Select(r => Path.GetFileName(((PortableExecutableReference)r).FilePath)).OrderBy(StringComparer.Ordinal)); 3294Assert.Equal("CSharpProject.csproj", Path.GetFileName(csharpProject.FilePath));
WorkspaceTestBase.cs (1)
45var fileName = Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CommandLineProject\CommandLineProjectTests.cs (2)
147var relativePath = Path.Combine(".", Path.GetFileName(pathToAssembly)); 162var relativePath = Path.Combine(".", Path.GetFileName(pathToAssembly));
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.DotNet.ApiCompat.Task (1)
ValidateAssemblies.cs (1)
148string filename = Path.GetFileName(path);
Microsoft.DotNet.ApiCompat.Tests (1)
ValidateAssemblies.cs (1)
148string filename = Path.GetFileName(path);
Microsoft.DotNet.ApiCompat.Tool (1)
ValidateAssemblies.cs (1)
148string 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.Arcade.Sdk.Tests (1)
Utilities\TestApp.cs (1)
23_logOutputDir = Path.Combine(logOutputDir, Path.GetFileName(workDir));
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
287projectFile = Path.GetFileName(projectFile);
Microsoft.DotNet.AsmDiff (1)
MarkdownDiffExporter.cs (1)
211? Path.GetFileName(GetFileNameForNamespace(namespaceName))
Microsoft.DotNet.Build.Tasks.Feed (16)
src\BlobFeedAction.cs (1)
82string fileName = Path.GetFileName(item.ItemSpec);
src\BuildModelFactory.cs (1)
169string fileName = Path.GetFileName(artifact.ItemSpec);
src\common\LatestLinksManager.cs (3)
94.Where(asset => !feedConfig.FilenamesToExclude.Contains(Path.GetFileName(asset))) 133_logger.LogMessage(MessageImportance.High, $" {Path.GetFileName(asset)}"); 153blobIdWithoutVersions = Path.GetFileName(blobIdWithoutVersions);
src\PublishArtifactsInManifestBase.cs (3)
458symbolsToPublish.Add(Path.GetFileName(name)); 1571var fileName = Path.GetFileName(asset); 1628var fileName = Path.GetFileName(asset);
src\PublishArtifactsInManifestV3.cs (2)
253var sourceFile = Path.Combine(BlobAssetsBasePath, Path.GetFileName(blobAsset.Id)); 254var destinationFile = Path.Combine(symbolTemporaryLocation, Path.GetFileName(blobAsset.Id));
src\PushToAzureDevOpsArtifacts.cs (1)
129string fileName = Path.GetFileName(i.ItemSpec);
src\SigningInformationModelFactory.cs (5)
54var fileName = Path.GetFileName(itemToSign.ItemSpec); 55if (!blobArtifacts.Any(b => Path.GetFileName(b.Id).Equals(fileName, StringComparison.OrdinalIgnoreCase)) && 60parsedItemsToSign.Add(new ItemToSignModel { Include = Path.GetFileName(fileName) }); 68parsedStrongNameSignInfo.Add(new StrongNameSignInfoModel { Include = Path.GetFileName(signInfo.ItemSpec), CertificateName = attributes["CertificateName"], PublicKeyToken = attributes["PublicKeyToken"] }); 76var fileSignInfoModel = new FileSignInfoModel { Include = Path.GetFileName(signInfo.ItemSpec), CertificateName = attributes["CertificateName"] };
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
BuildModelFactoryTests.cs (6)
96string bobSymbolsExpectedId = $"assets/symbols/{Path.GetFileName(bopSymbolsNupkg)}"; 98string bopSnupkgExpectedId = $"assets/symbols/{Path.GetFileName(bopSnupkg)}"; 319string bobSymbolsExpectedId = $"assets/symbols/{Path.GetFileName(bopSymbolsNupkg)}"; 321string bopSnupkgExpectedId = $"assets/symbols/{Path.GetFileName(bopSnupkg)}"; 710new TaskItem(Path.GetFileName(zipPath)), 711new TaskItem(Path.GetFileName(localPackagePath)),
Microsoft.DotNet.Build.Tasks.Installers (14)
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\CreateLitCommandPackageDrop.cs (1)
37string packageDropOutputFolder = Path.Combine(LitCommandWorkingDir, Path.GetFileName(InstallerFile));
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));
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)
353if(Path.GetFileName(fileName) == "runtime.json" && file.Target == "") 355string 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 (8)
CreateVisualStudioWorkload.wix.cs (1)
156Log.LogMessage(MessageImportance.Low, $"Setting {nameof(_supportsMachineArch)} to {manifestPackage.SupportsMachineArch} for {Path.GetFileName(manifestPackage.PackageFileName)}");
Msi\MsiProperties.wix.cs (1)
107Payload = Path.GetFileName(path),
Msi\WorkloadManifestMsi.wix.cs (2)
68NuGetPackageFiles[file] = @"\data\extractedManifest\" + Path.GetFileName(file); 101NuGetPackageFiles[jsonFullPath] = @"\data\extractedManifest\" + Path.GetFileName(jsonFullPath);
Swix\MsiSwixProject.wix.cs (1)
104return Path.Combine(relativePath, Path.GetFileName(_msi.ItemSpec));
WorkloadPackageBase.cs (1)
239File.Copy(PackagePath, Path.Combine(DestinationDirectory, Path.GetFileName(PackagePath)), overwrite: true);
WorkloadSetPackage.wix.cs (2)
118if (!Path.GetFileName(file).EndsWith("workloadset.json")) 120Log?.LogWarning(string.Format(Strings.WarnNonWorkloadSetFileFound, Path.GetFileName(file)));
Microsoft.DotNet.Cli.Utils (1)
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.Helix.JobSender (3)
Payloads\AdhocPayload.cs (3)
18$"Names of files to upload have to be distinct. The following name repeats at least once: {Path.GetFileName(duplicateName)}", 35string name = Path.GetFileName(file); 52duplicateName = files.FirstOrDefault(file => !filesSeen.Add(Path.GetFileName(file).ToLowerInvariant()));
Microsoft.DotNet.Helix.Sdk (2)
CreateXHarnessAndroidWorkItems.cs (1)
104string apkName = Path.GetFileName(apkPath);
CreateXUnitWorkItems.cs (1)
105string assemblyName = Path.GetFileName(targetPath);
Microsoft.DotNet.HotReload.Client.Package (1)
Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.DotNet.HotReload.Client.Tests (1)
Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.DotNet.Internal.SymbolHelper (3)
SymbolUploadHelper.cs (3)
186string packageName = Path.GetFileName(packagePath); 207string packageName = Path.GetFileName(package); 381string convertedPdbPath = Path.Combine(convertedPdbFolder, Path.GetFileName(file));
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.MSBuildSdkResolver (11)
FileBasedInstallationRecordInstaller.cs (2)
22.Select(path => new SdkFeatureBand(Path.GetFileName(path))); 36.Select(file => new WorkloadId(Path.GetFileName(file)));
SdkDirectoryWorkloadManifestProvider.cs (8)
319AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 346directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 398AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 426string manifestId = Path.GetFileName(manifestDirectory); 437return (directory: dir, version: Path.GetFileName(dir)); 472.Select(dir => Path.GetFileName(dir)) 553var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 568var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.DotNet.PackageInstall.Tests (6)
EndToEndToolTests.cs (3)
277var packages = Directory.GetFiles(toolPackagesPath, "*.nupkg").Select(p => Path.GetFileName(p)).ToArray(); 305var packages = Directory.GetFiles(toolPackagesPath, "*.nupkg").Select(p => Path.GetFileName(p)).ToArray(); 511$"The package {Path.GetFileName(packagePath)} should not contain a dependency on {dll}.");
TestToolBuilder.cs (2)
240var fileNames1 = new HashSet<string>(Array.ConvertAll(files1, f => Path.GetFileName(f) ?? string.Empty), StringComparer.OrdinalIgnoreCase); 241var fileNames2 = new HashSet<string>(Array.ConvertAll(files2, f => Path.GetFileName(f) ?? string.Empty), StringComparer.OrdinalIgnoreCase);
ToolPackageDownloaderTests.cs (1)
861.NotContain(e => Path.GetFileName(e) != ToolPackageStoreAndQuery.StagingDirectory);
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.RemoteExecutor (2)
RemoteExecutor.cs (2)
70if (!IOPath.GetFileName(HostRunner).Equals(hostName, StringComparison.OrdinalIgnoreCase)) 94HostRunnerName = IOPath.GetFileName(HostRunner);
Microsoft.DotNet.SharedFramework.Sdk (10)
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\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (3)
100otherFiles.Add(Path.GetFileName(file)); 107var fileName = Path.GetFileName(assemblyInfo.Path); 108var existingFileName = Path.GetFileName(existingInfo.Path);
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (2)
105var fileName = Path.GetFileName(assemblyInfo.Path); 106var existingFileName = Path.GetFileName(existingInfo.Path);
src\ValidateFileVersions.cs (1)
30var fileName = Path.GetFileName(file.ItemSpec);
Microsoft.DotNet.SignCheck (4)
SignCheck.cs (3)
205string downloadPath = Path.Combine(_appData, Path.GetFileName(uriResult.LocalPath)); 213string fileSearchPattern = Path.GetFileName(inputFile); 469string downloadPath = Path.Combine(_appData, Path.GetFileName(uri.LocalPath));
Utils.cs (1)
18var directory = Path.GetFileName(path);
Microsoft.DotNet.SignCheckLibrary (8)
Verification\ArchiveVerifier.cs (1)
45string aliasFileName = String.Equals(extension.ToLowerInvariant(), ".cab") ? Path.GetFileName(archiveEntry.FullName) :
Verification\Exclusions.cs (2)
80if (IsMatch(e.FilePatterns, Path.GetFileName(containerPath)) || IsMatch(e.FilePatterns, containerPath) || IsMatch(e.FilePatterns, path) || IsMatch(e.FilePatterns, Path.GetFileName(path)) || IsMatch(e.FilePatterns, virtualPath))
Verification\ExeVerifier.cs (2)
44var payloadPath = Path.Combine(svr.VirtualPath, Path.GetFileName(file)); 45SignatureVerificationResult bundleEntryResult = VerifyFile(Path.GetFullPath(file), svr.Filename, payloadPath, Path.GetFileName(file));
Verification\FileVerifier.cs (1)
165Log.WriteMessage(LogVerbosity.Detailed, String.Format(SignCheckResources.ProcessingFile, Path.GetFileName(path), String.IsNullOrEmpty(parent) ? SignCheckResources.NA : parent));
Verification\SignatureVerificationManager.cs (1)
119result = fileVerifier.VerifySignature(file, parent: null, virtualPath: Path.GetFileName(file));
Verification\SignatureVerificationResult.cs (1)
194Filename = Path.GetFileName(path);
Microsoft.DotNet.SignTool (8)
src\Configuration.cs (4)
149var fileUniqueKey = new SignedFileContentKey(contentHash, Path.GetFileName(fullPath)); 690var fileUniqueKey = new SignedFileContentKey(contentHash, Path.GetFileName(relativePath)); 697packages.Add(Path.GetFileName(archivePath)); 702var fileName = Path.GetFileName(relativePath);
src\PathWithHash.cs (1)
38FileName = Path.GetFileName(fullPath);
src\VerifySignatures.cs (1)
24return Path.GetFileName(filePath).Equals(".signature.p7s", StringComparison.OrdinalIgnoreCase);
src\WixPackInfo.cs (2)
30string filename = Path.GetFileName(path); 39return Path.GetFileName(path).EndsWith(WixPackExtension, StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
204string filename = Path.GetFileName(snapshot.Path);
Microsoft.DotNet.TemplateLocator (9)
SdkDirectoryWorkloadManifestProvider.cs (8)
319AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 346directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 398AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 426string manifestId = Path.GetFileName(manifestDirectory); 437return (directory: dir, version: Path.GetFileName(dir)); 472.Select(dir => Path.GetFileName(dir)) 553var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 568var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.DotNet.Tools.Tests.ComponentMocks (3)
ToolPackageStoreMock.cs (3)
39Path.GetFileName( 73var name = Path.GetFileName(subdirectory); 104NuGetVersion.Parse(Path.GetFileName(subdirectory)),
Microsoft.Extensions.AI.OpenAI (2)
OpenAISpeechToTextClient.cs (2)
65Path.GetFileName(fileStream.Name) : // Use the file name if we can get one from the stream. 116Path.GetFileName(fileStream.Name) : // Use the file name if we can get one from the stream.
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationSource.cs (2)
80string? pathToFile = System.IO.Path.GetFileName(Path); 83pathToFile = System.IO.Path.Combine(System.IO.Path.GetFileName(directory), pathToFile);
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)
110builder.Append(Path.GetFileName(subpath)); 118var name = Path.GetFileName(subpath);
Microsoft.Extensions.FileSystemGlobbing (2)
InMemoryDirectoryInfo.cs (1)
54Name = 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)
src\Generators\Microsoft.Gen.ComplianceReports\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 (2)
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\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\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
207var label = Path.GetFileName(file); 245var 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 (2)
TensorflowTests.cs (2)
1927var label = Path.GetFileName(file); 1997var name = Path.GetFileName(errorResult.FileName);
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)
ConflictItem.cs (1)
114_fileName = OriginalItem == null ? string.Empty : Path.GetFileName(OriginalItem.ItemSpec);
ItemUtilities.cs (3)
74return Path.GetFileName(sourcePath); 104return targetPath != null ? Path.GetFileName(targetPath) : null; 141var fileName = Path.GetFileName(sourcePath);
Microsoft.NET.Build.Tasks (38)
CheckForUnsupportedWinMDReferences.cs (3)
56if (Path.GetFileName(referencePath.ItemSpec).Equals("System.Runtime.WindowsRuntime.dll", StringComparison.OrdinalIgnoreCase)) 63Log.LogError(Strings.WinMDTransitiveReferenceNotSupported, Path.GetFileName(referencePath.ItemSpec)); 73Log.LogError(Strings.WinMDReferenceNotSupportedOnTargetFramework, TargetFrameworkMoniker, Path.GetFileName(winMDReference.ItemSpec));
ConflictItem.cs (1)
114_fileName = OriginalItem == null ? string.Empty : Path.GetFileName(OriginalItem.ItemSpec);
DependencyContextBuilder.cs (1)
440resolvedPath = Path.GetFileName(referenceAssembly.FullPath);
FrameworkPackages\FrameworkPackages.cs (1)
132.Select(d => (Overrides: Path.Combine(d, "data", "PackageOverrides.txt"), Version: ParseVersion(Path.GetFileName(d))))
ItemUtilities.cs (3)
74return Path.GetFileName(sourcePath); 104return targetPath != null ? Path.GetFileName(targetPath) : null; 141var fileName = Path.GetFileName(sourcePath);
ParseTargetManifests.cs (1)
32var targetManifestFileName = Path.GetFileName(manifestFile);
PrepareForReadyToRunCompilation.cs (4)
277MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec)); 444bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec))); 445bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R; 449bool 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 (1)
16public string FileName => Path.GetFileName(FullPath);
ResolvedFile.cs (1)
33get { return Path.GetFileName(SourcePath); }
ResolvePackageAssets.cs (5)
1362WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.Path)); 1685Path.GetFileName(asset.Path), 1703WriteCopyLocalMetadataIfNeeded(package, Path.GetFileName(asset.Path)); 1720Path.GetFileName(asset.Path), 2025if (Path.GetFileName(resolvedPackageAssetPath) == apphostName)
ResolveRuntimePackAssets.cs (2)
269assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.GetFileName(assetPath)); 274assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.Combine(culture, Path.GetFileName(assetPath)));
ResolveTargetingPackAssets.cs (1)
289if (!Path.GetFileName(dll).Equals("netstandard.dll", StringComparison.OrdinalIgnoreCase))
ResourceAssemblyInfo.cs (1)
26string relativePath = Path.Combine(destinationSubDirectory, Path.GetFileName(referenceSatellitePath.ItemSpec));
RunReadyToRunCompiler.cs (2)
230if (IsPdbCompilation && string.Equals(Path.GetFileName(reference.ItemSpec), Path.GetFileName(_outputR2RImage), StringComparison.OrdinalIgnoreCase))
SdkDirectoryWorkloadManifestProvider.cs (8)
319AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 346directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 398AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 426string manifestId = Path.GetFileName(manifestDirectory); 437return (directory: dir, version: Path.GetFileName(dir)); 472.Select(dir => Path.GetFileName(dir)) 553var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 568var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
SingleProjectInfo.cs (1)
90string outputName = Path.GetFileName(projectReferencePath.ItemSpec);
TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.NET.Build.Tests (26)
GivenThatWeWantToBuildADesktopExe.cs (2)
54var referenceAssemblies = getValues.GetValues().Select(p => Path.GetFileName(p)).Order().ToArray(); 79if (Path.GetFileName(f.FullName).Equals(file, StringComparison.OrdinalIgnoreCase))
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (1)
167references.Select(r => Path.GetFileName(r))
GivenThatWeWantToBuildADesktopLibrary.cs (1)
91if (Path.GetFileName(projectPath).Equals(netFrameworkLibrary.Name + ".csproj", StringComparison.OrdinalIgnoreCase))
GivenThatWeWantToBuildALibrary.cs (3)
111string docFileIdentifier = documentationFile == null ? "null" : Path.GetFileName(documentationFile); 112string identifier = $"-genDoc={genDocFileIdentifier}, docFile={Path.GetFileName(docFileIdentifier)}"; 687var relativePathToSln = Path.GetFileName(testAsset.Path) + ".sln";
GivenThatWeWantToBuildANetCoreApp.cs (2)
646.Select(Path.GetFileName) 653.Select(Path.GetFileName)
GivenThatWeWantToBuildAWindowsDesktopProject.cs (2)
157var projFile = Path.Combine(testDirectory, Path.GetFileName(testDirectory) + ".csproj"); 262var projectPath = Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj");
GivenThatWeWantToBuildAWindowsRuntimeComponent.cs (1)
257File.Copy(file, Path.Combine(cppWinTargetDirectory, Path.GetFileName(file)));
GivenThatWeWantToFloatWarningLevels.cs (1)
368var expectedAnalyzerConfigFiles = analyzerConfigFiles.Where(file => string.Equals(Path.GetFileName(file), expectedMappedAnalyzerConfig));
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (1)
53string filename = Path.GetFileName(i.fullPath);
GivenThatWeWantToReferenceAProject.cs (1)
325if (Path.GetFileName(path).Equals("ProjectC.csproj"))
GivenThatWeWantToUseVB.cs (1)
169return Path.GetFileName(property) == "Microsoft.VisualBasic.dll"
GivenTransitiveFrameworkReferencesAreDisabled.cs (1)
93.Select(Path.GetFileName)
GiventThatWeWantDesignerSupport.cs (2)
95Path.GetFileName(item.Identity).Should().Be(item.TargetPath); 158.Select(p => Path.GetFileName(p));
GivenWeWantToRequireWindowsForDesktopApps.cs (4)
283.Should().Contain(i => i.RelativePath == "Microsoft.Windows.SDK.NET.dll" && Path.GetFileName(i.Identity) == "Microsoft.Windows.SDK.NET.dll", 287.Contain(i => i.RelativePath == "WinRT.Runtime.dll" && Path.GetFileName(i.Identity) == "WinRT.Runtime.dll", 310.Should().Contain(i => Path.GetFileName(Path.GetFullPath(i.FullAssetPath)) == "WinRT.Runtime.dll" && File.Exists(i.FullAssetPath), 314.Contain(i => Path.GetFileName(Path.GetFullPath(i.FullAssetPath)) == "WinRT.Runtime.dll" && File.Exists(i.FullAssetPath),
RoslynBuildTaskTests.cs (1)
166Path.GetFileName(call.CompilerFilePath).Should().Be(compilerFileName);
RuntimeIdentifierGraphTests.cs (2)
60Path.GetFileName(runtimeIdentifierGraphPath).Should().Be("RuntimeIdentifierGraph.json"); 64Path.GetFileName(runtimeIdentifierGraphPath).Should().Be("PortableRuntimeIdentifierGraph.json");
Microsoft.NET.Publish.Tests (23)
GivenThatWeWantToPreserveCompilationContext.cs (1)
173if (Path.GetFileName(path).Equals("TestApp.csproj", StringComparison.OrdinalIgnoreCase))
GivenThatWeWantToPublishAHelloWorldProject.cs (2)
1192File.Copy(file, Path.Combine(destinationDir, Path.GetFileName(file))); 1197CopyDirectory(directory, Path.Combine(destinationDir, Path.GetFileName(directory)));
GivenThatWeWantToPublishAnAotApp.cs (4)
1068var ilcVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(ilcToolsPath))); 1078var corelibReference = ilcReference.Where(r => Path.GetFileName(r).Equals("System.Private.CoreLib.dll")).Single(); 1083ilcReferenceVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(corelibReference))))); 1088ilcReferenceVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(corelibReference)));
GivenThatWeWantToPublishAProjectWithAllFeatures.cs (1)
196if (Path.GetFileName(path).Equals("TestApp.csproj", StringComparison.OrdinalIgnoreCase))
GivenThatWeWantToPublishReadyToRun.cs (3)
470return Path.GetFileName(Path.ChangeExtension(assemblyFile, "ni.pdb")); 476return Path.GetFileName(Path.ChangeExtension(assemblyFile, "ni.r2rmap")); 486return Path.GetFileName(Path.ChangeExtension(assemblyFile, "ni.{" + mvid + "}.map"));
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (6)
126var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 153var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 172FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe") 198var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 225var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 244FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
GivenThatWeWantToRunILLink.cs (2)
1868Path.GetFileName(f) == $"{assemblyName}.dll"))); 2312var illinkVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(illinkTargetsPath)));
PublishItemsOutputGroupOutputsTests.cs (1)
70OutputPath = Path.GetFileName(Path.GetFullPath(Path.Combine(testAsset.Path, testProject.Name, item.metadata["OutputPath"])))
PublishWpfApp.cs (3)
26var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 53var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 59FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
Microsoft.Net.Sdk.AnalyzerRedirecting (2)
SdkAnalyzerAssemblyRedirector.cs (2)
58string version = Path.GetFileName(versionDirectory); 115string directoryPathVersion = Path.GetFileName(Path.GetDirectoryName(directoryPath.Substring(0, index)));
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (1)
WasmAoTPublishIntegrationTest.cs (1)
95if (Path.GetFileName(p) == "blazorwasm.csproj")
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
GenerateBlazorWebAssemblyBootJson50.cs (1)
156result.config.Add(Path.GetFileName(configFile.ItemSpec));
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (16)
BlazorWasmStaticWebAssetsIntegrationTest.cs (3)
99if (Path.GetFileName(p) == "blazorwasm.csproj") 139if (Path.GetFileName(p) == "blazorwasm.csproj") 179if (Path.GetFileName(p) == "blazorwasm.csproj")
StaticWebAssetsBaselineFactory.cs (2)
111asset.Identity = Path.Combine(Path.GetDirectoryName(identity), Path.GetFileName(originalItemSpec) + Path.GetExtension(identity)) 320var fileName = Path.GetFileName(path);
WasmBuildIntegrationTest.cs (3)
150if (Path.GetFileName(p) == "blazorwasm.csproj") 188if (Path.GetFileName(p) == "blazorwasm.csproj") 235if (Path.GetFileName(p) == "blazorwasm.csproj")
WasmCompressionTests.cs (2)
20if (Path.GetFileName(p) == "blazorwasm.csproj") 73if (Path.GetFileName(p) == "blazorwasm.csproj")
WasmJsModulesIntegrationTests.cs (1)
63if (Path.GetFileName(p) == "blazorwasm.csproj")
WasmPublishIntegrationTest.cs (2)
1223if (Path.GetFileName(project) == "blazorhosted-rid.csproj") 1235if (Path.GetFileName(project) == "blazorwasm.csproj")
WasmPwaManifestTests.cs (3)
24if (Path.GetFileName(p) == "blazorwasm.csproj") 153if (Path.GetFileName(p) == "blazorwasm.csproj") 203if (Path.GetFileName(p) == "blazorwasm.csproj")
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.StaticWebAssets.Tasks (3)
DefineStaticWebAssets.cs (3)
261var fileNamePattern = Path.GetFileName(identity); 372var itemSpecFileName = Path.GetFileName(candidateFullPath); 373var relativeFileName = Path.GetFileName(relativePath);
Microsoft.NET.Sdk.StaticWebAssets.Tests (26)
LegacyStaticWebAssetsV1IntegrationTest.cs (4)
20if (Path.GetFileName(project) == "AnotherClassLib.csproj") 26if (Path.GetFileName(project) == "ClassLibrary.csproj") 83if (Path.GetFileName(project) == "AnotherClassLib.csproj") 89if (Path.GetFileName(project) == "ClassLibrary.csproj")
ScopedCssIntegrationTests.cs (4)
454if (Path.GetFileName(project) == "AnotherClassLib.csproj") 458if (Path.GetFileName(project) == "ClassLibrary.csproj") 502if (Path.GetFileName(project) == "AnotherClassLib.csproj") 506if (Path.GetFileName(project) == "ClassLibrary.csproj")
StaticWebAssetEndpointsIntegrationTest.cs (4)
411if (Path.GetFileName(p) == "blazorwasm.csproj") 438if (Path.GetFileName(p) == "blazorwasm.csproj") 465if (Path.GetFileName(p) == "blazorwasm.csproj") 491if (Path.GetFileName(p) == "blazorwasm.csproj")
StaticWebAssets\ResolveCompressedAssetsTest.cs (6)
44RelativePath = Path.GetFileName(ItemSpec), 164RelativePath = Path.GetFileName(ItemSpec), 266RelativePath = Path.GetFileName(ItemSpec), 310RelativePath = Path.GetFileName(ItemSpec), 359RelativePath = Path.GetFileName(ItemSpec), 424RelativePath = Path.GetFileName(ItemSpec),
StaticWebAssetsBaselineFactory.cs (2)
111asset.Identity = Path.Combine(Path.GetDirectoryName(identity), Path.GetFileName(originalItemSpec) + Path.GetExtension(identity)) 320var fileName = Path.GetFileName(path);
StaticWebAssetsDesignTimeTest.cs (3)
55Path.GetFileName(outputFiles[0]).Should().Be("staticwebassets.build.json"); 90Path.GetFileName(outputFiles[0]).Should().Be("staticwebassets.build.json"); 123Path.GetFileName(outputFiles[0]).Should().Be("staticwebassets.build.json");
StaticWebAssetsIntegrationTest.cs (3)
475if (Path.GetFileName(name).Equals("ClassLibrary.csproj", StringComparison.Ordinal)) 530if (Path.GetFileName(name).Equals("ClassLibrary.csproj", StringComparison.Ordinal)) 549if (Path.GetFileName(name).Equals("AppWithP2PReference.csproj", StringComparison.Ordinal))
Microsoft.NET.Sdk.WorkloadManifestReader (9)
SdkDirectoryWorkloadManifestProvider.cs (8)
319AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory)); 346directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory; 398AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir)); 426string manifestId = Path.GetFileName(manifestDirectory); 437return (directory: dir, version: Path.GetFileName(dir)); 472.Select(dir => Path.GetFileName(dir)) 553var featureBandDirectoryName = Path.GetFileName(featureBandDirectory); 568var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
TempDirectoryWorkloadManifestProvider.cs (1)
24var manifestId = Path.GetFileName(workloadManifestDirectory);
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (2)
WorkloadSuggestionFinderTests.cs (2)
206return installedPacks.Contains(Path.GetFileName(idDir)); 211return installedPacks.Contains(Path.GetFileName(idDir));
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (3)
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.NET.TestFramework (10)
AspNetSdkTest.cs (1)
65File.Copy(assetPath, Path.Combine(projectDirectory.Path, Path.GetFileName(assetPath)));
Assertions\CommandResultAssertions.cs (2)
214var searchPattern = Path.GetFileName(pattern); 231var searchPattern = Path.GetFileName(pattern);
Assertions\DependencyContextAssertions.cs (2)
31var nativeFilenames = nativeAssets.Select(n => Path.GetFileName(n)); 74return Path.Combine(folder, Path.GetFileName(f));
Commands\TestCommand.cs (1)
184File.Copy(binlogFile, Path.Combine(uploadRoot, Path.GetFileName(binlogFile)), true);
ProjectConstruction\TestProject.cs (1)
156File.Copy(file, Path.Combine(targetFolder, Path.GetFileName(file)));
TestAsset.cs (3)
56if (System.IO.Path.GetFileName(file).EndsWith("proj")) 89if (System.IO.Path.GetFileName(srcFile).EndsWith("proj") || System.IO.Path.GetFileName(srcFile).EndsWith("xml"))
Microsoft.TemplateEngine.Cli.UnitTests (1)
ParserTests\MiscTests.cs (1)
205expected = expected?.Replace("$filePath", Path.GetFileName(existingFilePath));
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.VisualBasic.Tests (1)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (1)
470Assert.Equal(_fileSystem.GetName(TestDirectory), Path.GetFileName(TestDirectory));
Microsoft.VisualStudio.LanguageServices (5)
PdbSourceDocument\AbstractSourceLinkService.cs (1)
43Path.GetFileName(codeViewEntry.Path),
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
59Path.GetFileName(_filePath));
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
48Path.GetFileName(_filePath));
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (2)
35var solutionName = Path.GetFileName(solution.FilePath); 127? Path.GetFileName(ReferenceUpdate.ReferenceInfo.ItemSpecification)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
LanguageService\CSharpLanguageService_ICSharpProjectHost.cs (1)
19var projectName = Path.GetFileName(projectRoot.GetFullProjectName()); // GetFullProjectName returns the path to the project file w/o the extension?
ProjectSystemShim\TempPECompilerService.cs (1)
55Path.GetFileName(pszOutputFileName),
Microsoft.VisualStudio.LanguageServices.DevKit (1)
src\VisualStudio\Core\Def\PdbSourceDocument\AbstractSourceLinkService.cs (1)
43Path.GetFileName(codeViewEntry.Path),
Microsoft.VisualStudio.LanguageServices.Implementation (2)
ProjectSystem\CPS\TempPECompiler.cs (1)
82compilation = compilation.WithAssemblyName(Path.GetFileName(outputFileName));
SolutionExplorer\AnalyzersCommandHandler.cs (1)
495string.Format(SolutionExplorerShim.Checking_out_0_for_editing, Path.GetFileName(pathToRuleSet)));
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Client\RemoteLanguageServiceWorkspace.cs (3)
265return AddDocumentToProject(filePath, language, Path.GetFileName(Path.GetDirectoryName(remoteWorkspaceRoot))); 269return AddDocumentToProject(filePath, language, Path.GetFileName(Path.GetDirectoryName(remoteExternalRoot))); 336name: Path.GetFileName(filePath),
MSBuild (2)
TypeLoader.cs (2)
200assembliesDictionary.Add(Path.GetFileName(localPath), localPath); 205assembliesDictionary[Path.GetFileName(runtimeAssembly)] = runtimeAssembly;
Pipelines.AppHost (2)
AppHost.cs (2)
286.CreateTaskAsync($"Uploading {Path.GetFileName(sourcePath)} to {fileShareName}", context.CancellationToken) 330var fileName = Path.GetFileName(filePath);
PrepareTests (5)
MinimizeUtil.cs (2)
88var fileName = Path.GetFileName(sourceFilePath); 298while (Path.GetFileName(Path.GetDirectoryName(groupDirectory)) is not (null or "Debug" or "Release"))
TestDiscovery.cs (3)
61var tfm = Path.GetFileName(dir)!; 62var configuration = Path.GetFileName(Path.GetDirectoryName(dir))!; 118return Path.GetFileName(Path.GetDirectoryName(path)) != "net472";
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);
Replay (2)
Replay.cs (1)
301fileName = Path.GetFileName(argValue);
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Roslyn.Diagnostics.Analyzers (6)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
RulesetToEditorconfigConverter (2)
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);
RunTests (5)
AssemblyInfo.cs (1)
13public string AssemblyName => Path.GetFileName(AssemblyPath);
AssemblyScheduler.cs (1)
46ConsoleUtil.WriteLine($"\tAssembly: {Path.GetFileName(kvp.Key)}, Test Type Count: {typeCount}, Test Count: {testCount}");
Options.cs (1)
264while (path is object && Path.GetFileName(path) != "artifacts")
Program.cs (2)
294var name = Path.GetFileName(project); 312var tfm = Path.GetFileName(targetFrameworkDirectory)!;
rzc (3)
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)
54TempOutputPath = Path.Combine(tempDirPath, Path.GetFileName(DestinationPath)); 65File.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)
83!Path.GetFileName(f).Equals("_._"); 94var fileName = Path.GetFileName(file); 119string subfolderName = Path.GetFileName(subfolder);
ReplaceFilesWithSymbolicLinks.cs (1)
79string fileName = Path.GetFileName(file);
TarGzFileCreateFromDirectory.cs (1)
102var sourceDirectoryName = Path.GetFileName(Path.GetDirectoryName(SourceDirectory));
SemanticSearch.BuildTask (1)
src\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
System.CommandLine.StaticCompletions (1)
CompletionsCommand.cs (1)
70var shellName = Path.GetFileName(shellPath);
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
98string fileName = Path.GetFileName(location);
System.Diagnostics.Process (3)
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)
120string dirName = Path.GetFileName(taskDir); 162string 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)
389string? actualEntryName = string.IsNullOrEmpty(entryName) ? Path.GetFileName(fileName) : entryName;
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
127if (Path.GetFileName(fileDestinationPath).Length == 0)
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
468AddDirectoryWatchUnlocked(directoryEntry, System.IO.Path.GetFileName(subDir));
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)
206string 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\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (2)
32public override string Name => _name ??= Path.GetFileName(OriginalPath); 173_name = Path.GetFileName(fullDestFileName);
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.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (1)
339string fileName = Path.GetFileName(storeName);
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.Analyzers.Tests (5)
CurrentReferences.cs (1)
82Path.GetFileName(v).StartsWith(major, StringComparison.InvariantCultureIgnoreCase));
TestFileLoader.cs (4)
56string toolName = Path.GetFileName(Path.GetDirectoryName(filePath))!; 64string toolName = Path.GetFileName(Path.GetDirectoryName(filePath))!; 72string toolName = Path.GetFileName(Path.GetDirectoryName(filePath))!; 80string toolName = Path.GetFileName(Path.GetDirectoryName(filePath))!;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
76image.Name = Path.GetFileName(name);
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
253string configuration = Path.GetFileName(Path.GetDirectoryName(assemblyDirectory))!;
Templates.Blazor.Tests (2)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Templates.Tests (2)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
Test.Utilities (4)
AdditionalFileProvider.cs (2)
41=> _additionalFiles.FirstOrDefault(x => Path.GetFileName(x.Path).Equals(fileName, StringComparison.OrdinalIgnoreCase)); 49=> _additionalFiles.Where(x => Regex.IsMatch(Path.GetFileName(x.Path), pattern, RegexOptions.IgnoreCase));
RulesetToEditorconfigConverter.cs (2)
50var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 51var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
TestDiscoveryWorker (1)
Program.cs (1)
64string assemblyFileName = Path.GetFileName(assemblyFilePath);
Text.Analyzers (6)
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\Dependencies\Contracts\Contract.cs (1)
160var fileName = filePath is null ? null : Path.GetFileName(filePath);
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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
52var name = rulesetNode.Attribute(RuleSetNameAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath); 53var description = rulesetNode.Attribute(RuleSetDescriptionAttributeName)?.Value ?? Path.GetFileName(rulesetFilePath);
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
317return System.IO.Path.GetFileName(sb.ToString().ToLower(CultureInfo.InvariantCulture));
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
WinFormsControlsTest (1)
ListViewTest.cs (1)
254Text = Path.GetFileName(file),
xunit.console (7)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (2)
83.Select(path => Tuple.Create(Path.GetFileName(path), Tuple.Create(tuple.Item1, tuple.Item2)))) 278var resolvedAssemblyPath = assemblies.FirstOrDefault(a => string.Equals(formattedUnmanagedDllName, Path.GetFileName(a), StringComparison.OrdinalIgnoreCase));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (2)
402groupRuntimeAssemblies.Where(a => Path.GetFileName(a) != "_._"))); 414groupNativeLibraries.Where(a => Path.GetFileName(a) != "_._")));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Resolution\AppBaseCompilationAssemblyResolver.cs (1)
87var assemblyFile = Path.GetFileName(assembly);
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Resolution\ReferenceAssemblyPathResolver.cs (1)
73var name = Path.GetFileName(path);
ConsoleRunner.cs (1)
380completionMessages.TryAdd(Path.GetFileName(assembly.AssemblyFilename), new ExecutionSummary());