793 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)
249_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 (1)
ApplicationModel\AspireStore.cs (1)
43filenameTemplate = Path.GetFileName(filenameTemplate);
Aspire.Hosting.Keycloak (1)
KeycloakResourceBuilderExtensions.cs (1)
171var fileName = Path.GetFileName(import);
Aspire.Templates.Tests (5)
TemplateTestsBase.cs (1)
77var appHostProjectName = Path.GetFileName(project.AppHostProjectDirectory)!;
tests\Shared\TemplatesTesting\AspireProject.cs (1)
249_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))}");
BuildActionTelemetryTable (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
BuildBoss (7)
CompilerNuGetCheckerUtil.cs (2)
105var packageFileName = Path.GetFileName(packageFullPath); 429var fileName = Path.GetFileName(filePath);
Extensions.cs (1)
30internal static string GetName(this PackagePart part) => Path.GetFileName(GetRelativeName(part));
ProjectData.cs (1)
19internal string FileName => Path.GetFileName(FilePath);
ProjectKey.cs (1)
20internal 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)
31var 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)
129if (Path.GetFileName(filePath) != metadataReferenceInfo.FileName)
Records.cs (2)
16internal string FileName => Path.GetFileName(FilePath); 17internal 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)
158var 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)
SourceGenerator.cs (1)
52var syntaxXmlFiles = context.AdditionalTextsProvider.Where(at => Path.GetFileName(at.Path) == "Syntax.xml").Collect();
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-getdocument (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
dotnet-openapi (2)
Commands\BaseCommand.cs (1)
372var fileName = Path.GetFileName(contentDisposition.FileName);
src\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);
GenerateAnalyzerNuspec (2)
Program.cs (2)
161var directoryName = Path.GetFileName(directory); 212var fileName = Path.GetFileName(file);
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)
257 protected 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)
55.ToLookup(file => IsManagedAssembly(file), file => Path.GetFileName(file));
InteractiveHost.UnitTests (7)
InteractiveHostCoreInitTests.cs (1)
85await Host.AddReferenceAsync(Path.GetFileName(dll.Path));
InteractiveHostDesktopInitTests.cs (1)
58await Host.AddReferenceAsync(Path.GetFileName(dll.Path));
InteractiveHostDesktopTests.cs (5)
722{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 802$@"{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 830{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 852$@"{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))} 1037{string.Format(InteractiveHostResources.Loading_context_from_0, Path.GetFileName(rspFile.Path))}
Metrics (10)
MetricsOutputWriter.cs (1)
43writer.WriteAttributeString("Name", Path.GetFileName(filePath));
Program.cs (5)
302Console.WriteLine($"Loading {Path.GetFileName(projectFile)}..."); 309Console.WriteLine($"Computing code metrics for {Path.GetFileName(projectFile)}..."); 328Console.WriteLine($"Loading {Path.GetFileName(solutionFile)}..."); 335Console.WriteLine($"Computing code metrics for {Path.GetFileName(solutionFile)}..."); 342Console.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);
Metrics.Legacy (10)
src\RoslynAnalyzers\Tools\Metrics\MetricsOutputWriter.cs (1)
43writer.WriteAttributeString("Name", Path.GetFileName(filePath));
src\RoslynAnalyzers\Tools\Metrics\Program.cs (5)
302Console.WriteLine($"Loading {Path.GetFileName(projectFile)}..."); 309Console.WriteLine($"Computing code metrics for {Path.GetFileName(projectFile)}..."); 328Console.WriteLine($"Loading {Path.GetFileName(solutionFile)}..."); 335Console.WriteLine($"Computing code metrics for {Path.GetFileName(solutionFile)}..."); 342Console.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)
23public string? GetFileName(string? path) => Path.GetFileName(path);
ZipArchiveManager.cs (1)
30string entryName = Path.GetFileName(filePath);
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
52public 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}."); 232var fileName = Path.GetFileName(i); 415string 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.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
422var dll = Path.Combine(Directory.GetCurrentDirectory(), "refs", Path.GetFileName(assembly)); 430dll = Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(assembly));
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)
408Path.GetFileName(contentRootAttribute.ContentRootTest)); 516Path.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.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.Build (22)
BuildCheck\Checks\PreferProjectReferenceCheck.cs (2)
76Path.GetFileName(projectProducingOutput.Item1), 103Path.GetFileName(projectReferencedViaOutput),
BuildCheck\Checks\SharedOutputPathCheck.cs (2)
81Path.GetFileName(projectPath), 82Path.GetFileName(conflictingProject),
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.cs (1)
1623value = Path.GetFileName(elementLocation.File);
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),
FileMatcher.cs (1)
525longParts[i - startingElement] = Path.GetFileName(longPath);
FrameworkLocationHelper.cs (1)
796string 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\TaskFactories\AssemblyTaskFactory.cs (1)
275string assemblyName = loadInfo.AssemblyName ?? Path.GetFileName(loadInfo.AssemblyFile);
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
76Path.GetFileName(logFilePath),
TypeLoader.cs (2)
195assembliesDictionary.Add(Path.GetFileName(localPath), localPath); 200assembliesDictionary[Path.GetFileName(runtimeAssembly)] = runtimeAssembly;
Utilities\FileSpecMatchTester.cs (1)
89string filename = Path.GetFileName(normalizedFileToMatch);
Microsoft.Build.BuildCheck.UnitTests (8)
EndToEndTests.cs (8)
545$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore" + 584$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore {(checkRequested ? "-check" : string.Empty)} -bl:{logFile}", 635$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", 698$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -bl:{logFile}", 749$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output); 785$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output); 809$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check" + 932$"{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)
2781if (Path.GetFileName(d).Equals("TestTemp", StringComparison.InvariantCultureIgnoreCase)) 2790File.Copy(file, Path.Combine(dest, Path.GetFileName(file))); 2795string 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)
322Project('{F14B399A-7131-4C87-9E4B-1186C45EF12D}') = 'RptProj', '" + Path.GetFileName(rptprojPath) + @"', '{CCCCCCCC-9925-4D57-9DAF-E0A9D936ABDB}' 326Project('{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)
2152string baseMatch = Path.GetFileName(normalizedCandidate.Substring(0, nextSlash));
Graph\IsolateProjects_Tests.cs (1)
453var file = Path.GetFileName(path);
ProjectCache\ProjectCacheTests.cs (1)
866itemResult.GetMetadata("File").ShouldBe(Path.GetFileName(projectPath));
TypeLoader_Tests.cs (1)
104string newAssemblyLocation = Path.Combine(folder.Path, Path.GetFileName(currentAssembly));
Microsoft.Build.Framework (3)
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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
CscTests.cs (1)
738File.Copy(dllPath, Path.Combine(dirPath, Path.GetFileName(dllPath)));
TestUtilities\DotNetSdkTestBase.cs (1)
210var projectFileName = Path.GetFileName(projectFilePath);
Microsoft.Build.Tasks.Core (32)
AddToWin32Manifest.cs (1)
138SaveManifest(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)
177string conventionDependentUpon = Path.ChangeExtension(Path.GetFileName(fileName), SourceFileExtension);
CreateVisualBasicManifestResourceName.cs (1)
193manifestName.Append(Path.GetFileName(info.cultureNeutralFilename));
DownloadFile.cs (1)
327?? Path.GetFileName(response.RequestMessage.RequestUri.LocalPath); // Otherwise attempt to get a file name from the URI
FileMatcher.cs (1)
525longParts[i - startingElement] = Path.GetFileName(longPath);
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)
461string 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 (5)
FileMatcher.cs (2)
525longParts[i - startingElement] = Path.GetFileName(longPath); 1638return IsMatch(Path.GetFileName(path), pattern);
FrameworkLocationHelper.cs (1)
796string 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 (12)
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)
290outputFileName = 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)
51filePath = Path.GetFileName(filePath);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
307var assemblyFileName = Path.GetFileName(assemblyFilePath);
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
110string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 158var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 172var satelliteFileName = Path.GetFileName(satelliteFilePath); 173var 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>
Microsoft.CodeAnalysis.Analyzers (13)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (4)
129string arg4 = Path.GetFileName(additionalText.Path); 183string arg2 = Path.GetFileName(additionalText.Path); 217string fileName = Path.GetFileName(textFile.Path); 335string arg2 = Path.GetFileName(additionalText.Path);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (4)
201string arg3 = Path.GetFileName(path); 232string arg1 = Path.GetFileName(path); 255string fileName = Path.GetFileName(text.Path); 464string arg1 = Path.GetFileName(releaseTrackingLine.Path);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (1)
59var fileName = Path.GetFileName(file.Path);
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 (4)
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 (5)
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)
158var 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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Contracts.Package (1)
Contract.cs (1)
158var 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 (25)
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 (17)
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()); 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); 8859AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 8916AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 8957AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order()); 10059string fileName = Path.GetFileName(filePath); 12245var fileName = Path.GetFileName(filePath);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
93var 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)
3442context.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.EditorFeatures (2)
Interactive\InteractiveSession.cs (1)
250Path.GetFileName(initializationScriptPath),
Peek\PeekHelpers.cs (1)
19var fileName = Path.GetFileName(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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Features (13)
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)),
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
87Path.GetFileName(TemporaryFilePath),
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
51var filePath = Path.Combine(tempFilePath, Path.GetFileName(sourceDocument.FilePath)); 132var relativePath = Path.GetFileName(sourceDocument.FilePath);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
114telemetryMessage.SetDll(Path.GetFileName(dllPath)); 360name: 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 (1)
108var name = Path.GetFileName(document.Name);
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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.LanguageServer (8)
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
156Pattern = Path.GetFileName(filePath)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (1)
107_watcher = new FileSystemWatcher(directoryPath, Path.GetFileName(filePath));
HostWorkspace\LanguageServerProjectLoader.cs (2)
258var projectName = Path.GetFileName(projectPath); 271message = string.Format(LanguageServerResources.There_were_problems_loading_project_0_See_log_for_details, Path.GetFileName(projectPath));
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
148return 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)
54var 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.PublicApiAnalyzers (5)
PublicApiFile.cs (1)
16var fileName = Path.GetFileName(path);
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)
116Path.GetFileName(peFilePath),
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteAnalyzerPathResolver.cs (1)
21=> Path.GetFullPath(Path.Combine(_baseDirectory, Path.GetFileName(analyzerPath)));
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
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)
152AssertEx.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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.UnitTests (2)
AnalyzerAssemblyLoaderTests.cs (1)
459var cultureInfo = CultureInfo.GetCultureInfo(Path.GetFileName(assemblyDir));
ShadowCopyAnalyzerPathResolverTests.cs (1)
104File.WriteAllText(filePath, $"{Path.GetFileName(groupName)}-{name}");
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (5)
CommandLineTests.vb (5)
1014Dim fileName = Path.GetFileName(source) 6838Path.GetFileName(sourceFile.Path) 6846String.Format("/win32manifest:{0}", Path.GetFileName(manifestFile.Path)), 6847Path.GetFileName(sourceFile.Path) 10940Dim name = Path.GetFileName(fileName)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
Attributes\InternalsVisibleToAndStrongNameTests.vb (4)
91Dim keyFileName = Path.GetFileName(s_keyPairFile) 121Dim keyFileName = Path.GetFileName(s_keyPairFile) 189Dim keyFileName = Path.GetFileName(s_keyPairFile) 246Dim publicKeyFileName = Path.GetFileName(s_publicKeyFile)
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)
110string name = Path.GetFileName(subDirectory).ToLowerInvariant(); 158var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 172var satelliteFileName = Path.GetFileName(satelliteFilePath); 173var 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)
158var 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)
242=> !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)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
MSBuildWorkspaceTestBase.cs (1)
132Assert.Equal("EmittedCSharpProject.dll", Path.GetFileName(p1.OutputFilePath));
VisualStudioMSBuildWorkspaceTests.cs (8)
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)); 3204project.MetadataReferences.Select(r => Path.GetFileName(((PortableExecutableReference)r).FilePath)).OrderBy(StringComparer.Ordinal));
WorkspaceTestBase.cs (1)
45var fileName = Path.GetFileName(filePath);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CommandLineProject\CommandLineProjectTests.cs (2)
148var relativePath = Path.Combine(".", Path.GetFileName(pathToAssembly)); 163var relativePath = Path.Combine(".", Path.GetFileName(pathToAssembly));
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
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)
290projectFile = Path.GetFileName(projectFile);
Microsoft.DotNet.AsmDiff (1)
MarkdownDiffExporter.cs (1)
211? Path.GetFileName(GetFileNameForNamespace(namespaceName))
Microsoft.DotNet.Build.Manifest.Tests (5)
BuildModelFactoryTests.cs (5)
102string bobSymbolsExpectedId = $"assets/symbols/{Path.GetFileName(bopSymbolsNupkg)}"; 104string bopSnupkgExpectedId = $"assets/symbols/{Path.GetFileName(bopSnupkg)}"; 436string bobSymbolsExpectedId = $"assets/symbols/{Path.GetFileName(bopSymbolsNupkg)}"; 438string bopSnupkgExpectedId = $"assets/symbols/{Path.GetFileName(bopSnupkg)}"; 585string bobSymbolsExpectedId = $"assets/symbols/{Path.GetFileName(bopSymbolsNupkg)}";
Microsoft.DotNet.Build.Tasks.Feed (7)
src\BlobFeedAction.cs (1)
82string fileName = Path.GetFileName(item.ItemSpec);
src\common\LatestLinksManager.cs (1)
153blobIdWithoutVersions = Path.GetFileName(blobIdWithoutVersions);
src\PublishArtifactsInManifestBase.cs (3)
450string symbolPackageName = Path.GetFileName(symbolAsset.Id); 1575var fileName = Path.GetFileName(targetBlobPath); 1655var fileName = Path.GetFileName(asset.Id);
src\PublishBuildToMaestro.cs (2)
619string id = $"assets/manifests/{repoName}/{buildNumber}/{Path.GetFileName(manifestFileName)}"; 634mergedManifestAsset.PipelineArtifactPath = Path.GetFileName(manifestFileName);
Microsoft.DotNet.Build.Tasks.Installers (13)
src\CreateLightCommandPackageDrop.cs (6)
32string packageDropOutputFolder = Path.Combine(LightCommandWorkingDir, Path.GetFileName(InstallerFile)); 54var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(WixProjectFile)); 56commandString.Append($" -wixprojectfile {Path.GetFileName(WixProjectFile)}"); 60commandString.Append($" -contentsfile {Path.GetFileName(ContentsFile)}"); 64commandString.Append($" -outputsfile {Path.GetFileName(OutputsFile)}"); 68commandString.Append($" -builtoutputsfile {Path.GetFileName(BuiltOutputsFile)}");
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.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)
21$"Names of files to upload have to be distinct. The following name repeats at least once: {Path.GetFileName(duplicateName)}", 38string name = Path.GetFileName(file); 55duplicateName = files.FirstOrDefault(file => !filesSeen.Add(Path.GetFileName(file).ToLowerInvariant()));
Microsoft.DotNet.Helix.Sdk (2)
CreateXHarnessAndroidWorkItems.cs (1)
107string apkName = Path.GetFileName(apkPath);
CreateXUnitWorkItems.cs (1)
108string assemblyName = Path.GetFileName(targetPath);
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.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.RemoteExecutor (2)
RemoteExecutor.cs (2)
65if (!IOPath.GetFileName(HostRunner).Equals(hostName, StringComparison.OrdinalIgnoreCase)) 89HostRunnerName = 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.SignCheckLibrary (9)
Utils.cs (1)
207string keyPath = Path.Combine(tempDir, Path.GetFileName(keyUrl));
Verification\ArchiveVerifier.cs (1)
172string aliasFileName = String.Equals(extension.ToLowerInvariant(), ".cab") ? Path.GetFileName(archiveEntry.RelativePath) :
Verification\Exclusions.cs (3)
151var values = new[] { path, containerPath, virtualPath, Path.GetFileName(path), Path.GetFileName(containerPath), Path.GetFileName(virtualPath) };
Verification\FileVerifier.cs (1)
165Log.WriteMessage(LogVerbosity.Detailed, String.Format(SignCheckResources.ProcessingFile, Path.GetFileName(path), String.IsNullOrEmpty(parent) ? SignCheckResources.NA : parent));
Verification\PortableExecutableVerifier.cs (1)
46svr.IsIgnoreStrongName = Exclusions.IsIgnoreStrongName(Path.GetFileName(svr.VirtualPath), parent, svr.VirtualPath, null);
Verification\SignatureVerificationManager.cs (1)
133result = fileVerifier.VerifySignature(file, parent: null, virtualPath: Path.GetFileName(file));
Verification\SignatureVerificationResult.cs (1)
203Filename = Path.GetFileName(path);
Microsoft.DotNet.SignCheckTask (4)
src\SignCheck.cs (3)
205string downloadPath = Path.Combine(_appData, Path.GetFileName(uriResult.LocalPath)); 213string fileSearchPattern = Path.GetFileName(inputFile); 477string downloadPath = Path.Combine(_appData, Path.GetFileName(uri.LocalPath));
src\Utils.cs (1)
18var directory = Path.GetFileName(path);
Microsoft.DotNet.SignTool (10)
src\Configuration.cs (4)
154var fileUniqueKey = new SignedFileContentKey(contentHash, Path.GetFileName(itemToSign.FullPath)); 764var fileUniqueKey = new SignedFileContentKey(contentHash, Path.GetFileName(relativePath)); 771packages.Add(Path.GetFileName(archivePath)); 776var fileName = Path.GetFileName(relativePath);
src\PathWithHash.cs (1)
38FileName = Path.GetFileName(fullPath);
src\SignTool.cs (2)
96archive.CreateEntryFromFile(file.FullPath, Path.GetFileName(file.FullPath)); 228var zipFilePath = Path.Combine(Path.GetDirectoryName(fullPath), Path.GetFileName(fullPath) + ".zip");
src\VerifySignatures.cs (1)
270string keyPath = Path.Combine(tempDir, Path.GetFileName(keyUrl));
src\WixPackInfo.cs (2)
33string filename = Path.GetFileName(path); 42return 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.XliffTasks (5)
Tasks\GatherTranslatedSource.cs (1)
66string relativePath = Path.GetFileName(translatedFullPath);
Tasks\GatherXlf.cs (1)
72$"Two or more source files to be translated in the same project are named {Path.GetFileName(sourceDocumentPath)}. " +
Tasks\TransformTemplates.cs (2)
73string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec)); 80File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
Tasks\XlfTask.cs (1)
111return $"../{Path.GetFileName(sourcePath)}";
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)
796groupRuntimeAssemblies.Where(a => Path.GetFileName(a.Path) != "_._"))); 808groupNativeLibraries.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)
40Name = 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)
220var name = Path.GetFileName(errorResult.FileName);
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
1924var label = Path.GetFileName(file); 1994var 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)
421File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
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 (6)
PdbSourceDocument\AbstractSourceLinkService.cs (1)
43Path.GetFileName(codeViewEntry.Path),
Progression\GraphBuilder.cs (1)
695var fileName = Path.GetFileName(document.FilePath);
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
63System.IO.Path.GetFileName(filePath),
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
59Path.GetFileName(_filePath));
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
48Path.GetFileName(_filePath));
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
35var solutionName = Path.GetFileName(solution.FilePath);
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.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),
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\TempPECompiler.TempPEProject.vb (1)
45Path.GetFileName(_outputPath),
MSBuild (2)
TypeLoader.cs (2)
195assembliesDictionary.Add(Path.GetFileName(localPath), localPath); 200assembliesDictionary[Path.GetFileName(runtimeAssembly)] = runtimeAssembly;
PrepareTests (5)
MinimizeUtil.cs (2)
83var fileName = Path.GetFileName(sourceFilePath); 261while (Path.GetFileName(Path.GetDirectoryName(groupDirectory)) is not (null or "Debug" or "Release"))
TestDiscovery.cs (3)
62var tfm = Path.GetFileName(dir)!; 63var configuration = Path.GetFileName(Path.GetDirectoryName(dir))!; 119return Path.GetFileName(Path.GetDirectoryName(path)) != "net472";
PresentationBuildTasks (5)
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
376relPath = 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)
3362resourceId = 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)
248fileName = Path.GetFileName(argValue);
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Roslyn.Diagnostics.Analyzers (4)
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)
268while (path is object && Path.GetFileName(path) != "artifacts")
Program.cs (2)
294var name = Path.GetFileName(project); 312var tfm = Path.GetFileName(targetFrameworkDirectory)!;
SemanticSearch.BuildTask (1)
src\Dependencies\Contracts\Contract.cs (1)
158var fileName = filePath is null ? null : Path.GetFileName(filePath);
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
66var mainModuleFileName = Path.GetFileName(mainModuleFullPath);
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)
374string? 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)
454AddDirectoryWatchUnlocked(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 (5)
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.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)
260string 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)
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);
TestDiscoveryWorker (1)
Program.cs (1)
66string assemblyFileName = Path.GetFileName(assemblyFilePath);
Text.Analyzers (4)
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));
VisualBasicSyntaxGenerator (2)
Program.vb (2)
74Dim prefix = Path.GetFileName(inputFile) 155Dim prefix = Path.GetFileName(inputFile)
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)
86.Select(path => Tuple.Create(Path.GetFileName(path), Tuple.Create(tuple.Item1, tuple.Item2)))) 281var 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)
384completionMessages.TryAdd(Path.GetFileName(assembly.AssemblyFilename), new ExecutionSummary());