743 references to DirectorySeparatorChar
aspire (3)
Projects\ProjectLocator.cs (1)
146var relativePath = Path.GetRelativePath(settingsFile.Directory.FullName, projectFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
src\Shared\PathNormalizer.cs (2)
16path = path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
Aspire.Hosting (4)
Publishing\ManifestPublishingContext.cs (2)
65var normalizedPath = path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
src\Shared\PathNormalizer.cs (2)
16path = path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
Aspire.Hosting.NodeJs (2)
src\Shared\PathNormalizer.cs (2)
16path = path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
Aspire.Hosting.Python (2)
src\Shared\PathNormalizer.cs (2)
16path = path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
Aspire.Hosting.Tests (2)
AspireStoreTests.cs (2)
41Assert.DoesNotContain($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}", path);
BuildValidator (2)
Program.cs (2)
108excludes.Add(Path.DirectorySeparatorChar + "runtimes" + Path.DirectorySeparatorChar);
csc (2)
src\Compilers\Shared\BuildClient.cs (1)
49internal static bool IsRunningOnWindows => Path.DirectorySeparatorChar == '\\';
src\Compilers\Shared\BuildServerConnection.cs (1)
570clientDirectory = clientDirectory.TrimEnd(Path.DirectorySeparatorChar);
dotnet-getdocument (1)
Commands\InvokeCommand.cs (1)
105args.Add(packageFolder.TrimEnd(Path.DirectorySeparatorChar));
dotnet-svcutil.xmlserializer (6)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
166dirPath = "." + Path.DirectorySeparatorChar;
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
193if (!directoryArgValue.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 194directoryArgValue += Path.DirectorySeparatorChar;
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (3)
63return "." + Path.DirectorySeparatorChar; 66if (!directory.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 67return TryGetFullPath(directory + Path.DirectorySeparatorChar, null);
dotnet-svcutil-lib (7)
OutputPathHelper.cs (2)
55if (!directory.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 57return TryGetFullPath(directory + Path.DirectorySeparatorChar, null);
Shared\MSBuildProj.cs (1)
558basePath = dependency.FullPath.Substring(0, dependency.FullPath.LastIndexOf(Path.DirectorySeparatorChar));
Shared\Utilities\PathHelper.cs (3)
114var parentSegments = Path.GetFullPath(parentPath.FullName).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries); 115var childSegments = Path.GetFullPath(childDirectory).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries); 168return path.Split(new char[] { '/', '\\', Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
Shared\Utilities\RuntimeEnvironmentHelper.cs (1)
87.Select(e => e.Attribute("value").Value.TrimEnd(Path.DirectorySeparatorChar))
dotnet-svcutil-lib.Tests (3)
E2ETests.cs (1)
182uri = uri.Replace("$wsdlDir$", $"{Path.GetDirectoryName(wsdlFile)}{Path.DirectorySeparatorChar}");
TestInit.cs (2)
365var nonRefbaselineFiles = baselineFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList(); 377var nonRefGeneratedFiles = generatedFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
illink (1)
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.Arcade.Common (1)
CommandFactory.cs (1)
61else if (executable.Contains(Path.DirectorySeparatorChar))
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
90return targetPath.Replace(basePath, "").TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
Microsoft.AspNetCore (1)
HostingPathResolver.cs (1)
15Path.EndsInDirectorySeparator(path) ? path : path + Path.DirectorySeparatorChar;
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Builder\TestFileProvider\TestFileProvider.cs (2)
114filePath = filePath.Replace('/', Path.DirectorySeparatorChar); 116if (filePath[0] == Path.DirectorySeparatorChar)
Microsoft.AspNetCore.DataProtection (3)
Internal\ContainerUtils.cs (2)
65var fs_file = new DirectoryInfo(fields[1].TrimEnd(Path.DirectorySeparatorChar)).FullName; 70if (fs_file.Equals(dir.FullName.TrimEnd(Path.DirectorySeparatorChar), StringComparison.Ordinal))
Internal\HostingApplicationDiscriminator.cs (1)
14private readonly string DirectorySeparator = Path.DirectorySeparatorChar.ToString();
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
684Assert.EndsWith(Path.DirectorySeparatorChar + "testroot", basePath); 687Assert.EndsWith(Path.DirectorySeparatorChar + "testroot", basePath2);
Microsoft.AspNetCore.Http.Results.Tests (1)
ResultsTests.cs (1)
1754(() => Results.File(Path.Join(Path.DirectorySeparatorChar.ToString(), "rooted", "path"), null, null, null, null, false), typeof(PhysicalFileHttpResult)),
Microsoft.AspNetCore.Mvc.Core.Test (1)
ApplicationParts\RelatedAssemblyPartTest.cs (1)
12private static readonly string AssemblyDirectory = Path.GetTempPath().TrimEnd(Path.DirectorySeparatorChar);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
FileProviderRazorProjectItem.cs (1)
81(PhysicalPath[_root.Length] == Path.DirectorySeparatorChar || PhysicalPath[_root.Length] == Path.AltDirectorySeparatorChar))
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
TestFileProvider.cs (2)
114filePath = filePath.Replace('/', Path.DirectorySeparatorChar); 116if (filePath[0] == Path.DirectorySeparatorChar)
Microsoft.AspNetCore.Server.IIS (2)
StartupHook.cs (1)
50var contentRoot = iisConfigData.pwzFullApplicationPath.TrimEnd(Path.DirectorySeparatorChar);
WebHostBuilderIISExtensions.cs (1)
32var contentRoot = iisConfigData.pwzFullApplicationPath.TrimEnd(Path.DirectorySeparatorChar);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
474builder.Host.UseContentRoot(contentRoot + Path.DirectorySeparatorChar); 478builder.WebHost.UseContentRoot(contentRoot + Path.DirectorySeparatorChar);
Microsoft.Build (41)
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (2)
195else if (Path.DirectorySeparatorChar == '/') 201else if (!sawStartChar && Path.DirectorySeparatorChar == '\\')
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (2)
103internal static string NormalizeWithForwardSlash(string p) => Path.DirectorySeparatorChar == '/' ? p : p.Replace(Path.DirectorySeparatorChar, '/');
Construction\Solution\SolutionProjectGenerator.cs (5)
1716(aspNetPhysicalPath[aspNetPhysicalPath.Length - 1] == Path.DirectorySeparatorChar)) 1756string publishWebsitePath = EscapingUtilities.Escape(WebProjectOverrideFolder) + Path.DirectorySeparatorChar + EscapingUtilities.Escape(lastFolderInPhysicalPath) + Path.DirectorySeparatorChar; 2288if (!directoryName.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 2290directoryName += Path.DirectorySeparatorChar;
Definition\ToolsetReader.cs (2)
164var currentDir = BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory.TrimEnd(Path.DirectorySeparatorChar); 190var xbuildToolsetsDir = Path.Combine(libraryPath, $"xbuild{Path.DirectorySeparatorChar}");
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
85return lastCharacter == Path.DirectorySeparatorChar || lastCharacter == Path.AltDirectorySeparatorChar || lastCharacter == '\\';
Evaluation\Expander.cs (1)
1714return NativeMethodsShared.FrameworkBasePath + Path.DirectorySeparatorChar;
Evaluation\Expander\WellKnownFunctions.cs (2)
96else if (string.Equals(methodName, nameof(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase)) 100returnVal = Path.DirectorySeparatorChar;
Evaluation\IntrinsicFunctions.cs (1)
297return Path.Combine(NativeMethodsShared.FrameworkBasePath, m.Groups[0].Value) + Path.DirectorySeparatorChar;
FileMatcher.cs (2)
29private static readonly string s_directorySeparatorString = Path.DirectorySeparatorChar.ToString(); 691return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 277path.Substring(start) + Path.DirectorySeparatorChar); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
FrameworkLocationHelper.cs (4)
557Path.DirectorySeparatorChar.ToString(), 566s_pathToV35ToolsInFallbackDotNetFrameworkSdk += Path.DirectorySeparatorChar; 1013var endedWithASlash = path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal) 1034fixedPath += Path.DirectorySeparatorChar;
Globbing\MSBuildGlob.cs (1)
150normalizedInput += Path.DirectorySeparatorChar;
Graph\GraphBuilder.cs (2)
296if (!solutionDirectoryName.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 298solutionDirectoryName += Path.DirectorySeparatorChar;
Instance\ProjectItemInstance.cs (1)
2205if (Path.DirectorySeparatorChar != '\\' && includeEscaped?.IndexOf('\\') > -1)
Modifiers.cs (1)
422modifiedItemSpec += Path.DirectorySeparatorChar;
Microsoft.Build.CommandLine.UnitTests (1)
XMake_Tests.cs (1)
1526output.ShouldContain($"[A={directory.Path}{Path.DirectorySeparatorChar}]");
Microsoft.Build.Engine.OM.UnitTests (26)
Construction\ProjectRootElement_Tests.cs (1)
666string file = "bar" + Path.DirectorySeparatorChar + "foo.proj";
Definition\Project_Tests.cs (9)
206string file = Path.GetTempPath() + Path.DirectorySeparatorChar + Guid.NewGuid().ToString("N"); 721project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 722projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 757project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 758projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 777<IntermediateAssembly Include='obj" + Path.DirectorySeparatorChar + "i386" 778+ Path.DirectorySeparatorChar 2497string unevaluatedInclude = ".." + Path.DirectorySeparatorChar + "*"; 2498string evaluatedInclude = ".." + Path.DirectorySeparatorChar + "b.targets";
Definition\ProjectItem_Tests.cs (1)
761expectedInclude = expectedInclude.Select(p => setSlashes(p, Path.DirectorySeparatorChar)).ToArray();
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar))); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
TransientIO.cs (1)
33private static bool IsDirSlash(char c) => c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
Microsoft.Build.Engine.UnitTests (113)
BackEnd\IntrinsicTask_Tests.cs (2)
2535<i1 Remove='" + projectDirectory.Path + Path.DirectorySeparatorChar + @"*.tmp'/> 3365+ Path.DirectorySeparatorChar + "]");
BackEnd\MSBuild_Tests.cs (2)
757logger.AssertLogContains($"iout6=[a{Path.DirectorySeparatorChar}b.foo]"); 763logger.AssertLogContains($"iin6=[a{Path.DirectorySeparatorChar}b.foo]");
BackEnd\TaskBuilder_Tests.cs (1)
443string slashAndBracket = Path.DirectorySeparatorChar.ToString() + "]";
Definition\ToolsVersion_Tests.cs (1)
962string pathWithoutTrailingSlash = path.EndsWith(Path.DirectorySeparatorChar.ToString())
Evaluation\Evaluator_Tests.cs (5)
1157directory2 = Path.Combine(Path.GetTempPath(), "fol$der" + Path.DirectorySeparatorChar + "fol$der2"); 1418logger.AssertLogContains(aProjName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar); 1425logger.AssertLogContains(targets1FileName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar); 1432logger.AssertLogContains(targets2FileName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar + "b" + Path.DirectorySeparatorChar);
Evaluation\Expander_Tests.cs (32)
287Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude); 343Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, result); 535log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar)); 557log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar)); 579log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar)); 660Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude); 1435subdir1" + Path.DirectorySeparatorChar + @": aaa=111 1436subdir2" + Path.DirectorySeparatorChar + @": bbb=222 1486"subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar, 1538@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + 1539Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi", 1560@"string$(p);dialogs%253b ; splash.bmp ; ; ; ; \jk ; l\mno%253bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%253bdef;ghi", 1671Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandAll, MockElementLocation.Instance)); 1699Assert.Equal("subdir1" + Path.DirectorySeparatorChar, expanded[5]); 1700Assert.Equal("subdir2" + Path.DirectorySeparatorChar, expanded[6]); 2154Assert.Equal(Path.Combine(Path.DirectorySeparatorChar.ToString(), "my", "project", "is", "here.proj"), result); 2182pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar)); 2186string result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot2.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance); 2188result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance); 2317pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar)); 2323@"'$(PathRoot2.Endswith(`" + Path.DirectorySeparatorChar + "`))' == 'true'", 2333@"'$(PathRoot.EndsWith(" + Path.DirectorySeparatorChar + "))' == 'false'", 2695pg.Set(ProjectPropertyInstance.Create("File", "foo goo" + Path.DirectorySeparatorChar + "file.txt")); 2794pg.Set(ProjectPropertyInstance.Create("File", "foo" + Path.DirectorySeparatorChar + "file.txt")); 2812pg.Set(ProjectPropertyInstance.Create("File", "foo" + Path.DirectorySeparatorChar + "file.txt")); 3615$"{Path.GetFullPath("one")}{Path.DirectorySeparatorChar}", 3619$"{Path.GetFullPath(Path.Combine("one", "two"))}{Path.DirectorySeparatorChar}", 4355Assert.Equal(path + Path.DirectorySeparatorChar, result); 4360Assert.Equal(path + Path.DirectorySeparatorChar, result);
Evaluation\Preprocessor_Tests.cs (42)
94" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 102" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 109" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 138" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 146" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 153" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 182" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 190" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 197" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 226" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 234" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 244" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 274" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 308" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 319" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 326" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 386" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 429" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 441" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 451" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 487" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 499" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 509" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 516" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3 526" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 560" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 568" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 575" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 582" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3 589" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 621" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 629" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2 636" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 643" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3 650" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 681" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 711xml0.AddImport(directory + Path.DirectorySeparatorChar + "*.targets"); 713xml1 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "1.targets"); 717xml2 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "2.targets"); 721xml3 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "3.xxxxxx"); 737" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1 770" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
FileMatcher_Tests.cs (20)
126.Select(i => i.Replace(Path.DirectorySeparatorChar, '\\')) 656private static readonly char S = Path.DirectorySeparatorChar; 787"Source" + Path.DirectorySeparatorChar + "**", 790"Source" + Path.DirectorySeparatorChar + "Bart.txt", 791"Source" + Path.DirectorySeparatorChar + "Sub" + Path.DirectorySeparatorChar + "Homer.txt", 795"Destination" + Path.DirectorySeparatorChar + "Bart.txt", 796"Destination" + Path.DirectorySeparatorChar + "Sub" + Path.DirectorySeparatorChar + "Homer.txt", 2225string normalized = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); 2226if (Path.DirectorySeparatorChar != '\\') 2228normalized = path.Replace("\\", Path.DirectorySeparatorChar.ToString()); 2237normalized = normalized.Replace(@".." + Path.DirectorySeparatorChar, "<:PARENT:>"); 2240string doubleSeparator = Path.DirectorySeparatorChar.ToString() + Path.DirectorySeparatorChar.ToString(); 2241normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2242normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2243normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2246normalized = normalized.Replace(@"." + Path.DirectorySeparatorChar, ""); 2250normalized = normalized.Replace("<:PARENT:>", @".." + Path.DirectorySeparatorChar);
FileUtilities_Tests.cs (4)
43Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier); 47Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier); 882var secondSlash = SystemSpecificAbsolutePath.Substring(1).IndexOf(Path.DirectorySeparatorChar) + 1; 1031expectedTruncatedPath = expectedTruncatedPath.Replace('/', Path.DirectorySeparatorChar);
Globbing\MSBuildGlob_Tests.cs (4)
33Assert.Equal(glob.TestOnlyGlobRoot.LastOrDefault(), Path.DirectorySeparatorChar); 170Assert.EndsWith("%42" + Path.DirectorySeparatorChar, glob.FixedDirectoryPart); 358string normalizedPath = path.Replace(Path.DirectorySeparatorChar == '/' ? '\\' : '/', Path.DirectorySeparatorChar);
Microsoft.Build.Framework (5)
Constants.cs (1)
132internal static readonly char[] DirectorySeparatorChar = [Path.DirectorySeparatorChar];
FileClassifier.cs (3)
331return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 351return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 358fileSpec += Path.DirectorySeparatorChar;
InterningWriteTranslator.cs (1)
28private static readonly char[] DirectorySeparatorChars = [Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar];
Microsoft.Build.Tasks.CodeAnalysis (5)
MapSourceRoots.cs (1)
85return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
src\Compilers\Shared\BuildServerConnection.cs (1)
570clientDirectory = clientDirectory.TrimEnd(Path.DirectorySeparatorChar);
Utilities.cs (1)
25=> string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/');
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (32)
CscTests.cs (1)
509Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents());
DotNetSdkTests.cs (28)
28var root1 = Path.GetFullPath(ProjectDir.Path + Path.DirectorySeparatorChar); 29var root2 = Path.GetFullPath(sourcePackageDir.Path + Path.DirectorySeparatorChar); 32root3 += Path.DirectorySeparatorChar; 54<SourceRoot Include=""{root1}sub1{Path.DirectorySeparatorChar}"" SourceControl=""git"" NestedRoot=""sub1"" ContainingRoot=""{root1}"" SourceLinkUrl=""https://raw.githubusercontent.com/M1/*""/> 55<SourceRoot Include=""{root1}sub2{Path.DirectorySeparatorChar}"" SourceControl=""git"" NestedRoot=""sub2"" ContainingRoot=""{root1}"" SourceLinkUrl=""https://raw.githubusercontent.com/M2/*""/> 100$@"{root1}sub1{Path.DirectorySeparatorChar}: /_/sub1/", 101$@"{root1}sub2{Path.DirectorySeparatorChar}: /_/sub2/", 140$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}", 141$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}", 150$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," + 151$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]", 178$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}", 179$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}", 188$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," + 189$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]", 216$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}", 217$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}", 226$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," + 227$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]", 347$"X{Path.DirectorySeparatorChar}", 348$"Y{Path.DirectorySeparatorChar}", 349$"Z{Path.DirectorySeparatorChar}",
TargetTests.cs (1)
797var intermediatePath = intermediatePathDir + Path.DirectorySeparatorChar.ToString();
TestUtilities\DotNetSdkTestBase.cs (1)
68s_dotnetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
VbcTests.cs (1)
448Assert.Equal(@$"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.vb subdir{Path.DirectorySeparatorChar}test.vb", vbc.GenerateResponseFileContents());
Microsoft.Build.Tasks.Core (30)
AssignTargetPath.cs (1)
93!Files[i].ItemSpec.Contains("." + Path.DirectorySeparatorChar) &&
BootstrapperUtil\BootstrapperBuilder.cs (4)
430invariantPath = Util.AddTrailingChar(invariantPath, System.IO.Path.DirectorySeparatorChar); 453packagePaths.AddRange(Util.AdditionalPackagePaths.Select(p => Util.AddTrailingChar(p.ToLowerInvariant(), System.IO.Path.DirectorySeparatorChar))); 606if (strSubDirectory[nStartIndex] == System.IO.Path.DirectorySeparatorChar) 967System.IO.Path.DirectorySeparatorChar)
CreateCSharpManifestResourceName.cs (3)
185manifestName.Replace(Path.DirectorySeparatorChar, '.'); 210manifestName.Replace(Path.DirectorySeparatorChar, '.'); 218manifestName.Insert(0, Path.DirectorySeparatorChar);
CreateVisualBasicManifestResourceName.cs (1)
200manifestName.Insert(0, Path.DirectorySeparatorChar);
FileMatcher.cs (2)
29private static readonly string s_directorySeparatorString = Path.DirectorySeparatorChar.ToString(); 691return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar))); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
ManifestUtil\PathUtil.cs (4)
23path = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); 24path = path.TrimEnd(Path.DirectorySeparatorChar); 38path = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); 39path = path.TrimEnd(Path.DirectorySeparatorChar);
Modifiers.cs (1)
422modifiedItemSpec += Path.DirectorySeparatorChar;
Microsoft.Build.Tasks.UnitTests (70)
CombinePath_Tests.cs (1)
77string path1 = Path.DirectorySeparatorChar + Path.Combine("ghi", "jkl.txt");
CreateItem_Tests.cs (1)
214result.ResultsByTarget["Repro"].Items[0].GetMetadata("RecursiveDir").ShouldBe("Subdir" + Path.DirectorySeparatorChar);
GetInstalledSDKLocations_Tests.cs (16)
75Directory.CreateDirectory(Path.Combine(tempPath, "Windows", "v3.0") + Path.DirectorySeparatorChar); 79Path.Combine(tempPath, "Windows", "NotAVersion") + Path.DirectorySeparatorChar); 98Directory.CreateDirectory(Path.Combine(tempPath, "Walls" + Path.DirectorySeparatorChar + "1.0" + Path.DirectorySeparatorChar)); 345+ Path.DirectorySeparatorChar, 351+ Path.DirectorySeparatorChar, 357+ Path.DirectorySeparatorChar, 364+ Path.DirectorySeparatorChar, 370+ Path.DirectorySeparatorChar, 376+ Path.DirectorySeparatorChar, 419+ Path.DirectorySeparatorChar, 425+ Path.DirectorySeparatorChar, 431+ Path.DirectorySeparatorChar, 438+ Path.DirectorySeparatorChar, 444+ Path.DirectorySeparatorChar, 450+ Path.DirectorySeparatorChar,
ProjectExtensionsImportTestBase.cs (1)
155project.GetPropertyValue("MSBuildProjectExtensionsPath").ShouldBe($@"{projectExtensionsDirectory}{Path.DirectorySeparatorChar}");
ResolveSDKReference_Tests.cs (48)
124string testDirectory = Path.Combine(new[] { testDirectoryRoot, "MyPlatform", "8.0", "ExtensionSDKs", "SDkWithManifest", "2.0" }) + Path.DirectorySeparatorChar; 463string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 578string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 633string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 691string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 746string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 801string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 856string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 913string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 968string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1022string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1492string testDirectory = Path.Combine(testDirectoryRoot, "BadTestSDK", "2.0") + Path.DirectorySeparatorChar; 1602string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1708string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1793string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1891string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 1964string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2033string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2100string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2174string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2242string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2313string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2385string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2454string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2527string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2592string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2659string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2723string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2791string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar; 2792string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 2793string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "3.0") + Path.DirectorySeparatorChar; 2889string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar; 2890string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK1", "2.0") + Path.DirectorySeparatorChar; 2891string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "3.0") + Path.DirectorySeparatorChar; 2987string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar; 2988string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK2", "2.0") + Path.DirectorySeparatorChar; 2989string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "3.0") + Path.DirectorySeparatorChar; 2990string testDirectory4 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "4.0") + Path.DirectorySeparatorChar; 3100string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar; 3101string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3102string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "3.0") + Path.DirectorySeparatorChar; 3206string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3280string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3357string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3423string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3501string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3565string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar; 3639+ Path.DirectorySeparatorChar;
WriteCodeFragment_Tests.cs (1)
175string folder = Path.Combine(Path.GetTempPath(), "foo" + Path.DirectorySeparatorChar);
XmlPeek_Tests.cs (1)
365xmlInputPath = dir + Path.DirectorySeparatorChar + "doc.xml";
XmlPoke_Tests.cs (1)
335xmlInputPath = dir + Path.DirectorySeparatorChar + "doc.xml";
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
197return path.Replace('/', Path.DirectorySeparatorChar).Replace('\\', Path.DirectorySeparatorChar);
Microsoft.Build.Utilities.Core (25)
CommandLineBuilder.cs (1)
342AppendTextWithQuoting("." + Path.DirectorySeparatorChar + fileName);
FileMatcher.cs (2)
29private static readonly string s_directorySeparatorString = Path.DirectorySeparatorChar.ToString(); 691return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 277path.Substring(start) + Path.DirectorySeparatorChar); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
FrameworkLocationHelper.cs (4)
557Path.DirectorySeparatorChar.ToString(), 566s_pathToV35ToolsInFallbackDotNetFrameworkSdk += Path.DirectorySeparatorChar; 1013var endedWithASlash = path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal) 1034fixedPath += Path.DirectorySeparatorChar;
Modifiers.cs (1)
422modifiedItemSpec += Path.DirectorySeparatorChar;
ToolLocationHelper.cs (2)
2251Path.DirectorySeparatorChar.ToString(), 2254dotNetFrameworkReferenceAssemblies[i] += Path.DirectorySeparatorChar;
ToolTask.cs (1)
1656sb[i] = Path.DirectorySeparatorChar;
Microsoft.Build.Utilities.UnitTests (53)
CommandLineBuilder_Tests.cs (7)
144c.ShouldBe($".{Path.DirectorySeparatorChar}-Mercury.cs .{Path.DirectorySeparatorChar}-Venus.cs .{Path.DirectorySeparatorChar}-Earth.cs"); 157c.ShouldBe($".{Path.DirectorySeparatorChar}-Mercury.cs Venus.cs .{Path.DirectorySeparatorChar}-Earth.cs"); 259c.ShouldBe($"/something .{Path.DirectorySeparatorChar}-Mercury.cs Mercury.cs \"Mer cury.cs\""); 275c.ShouldBe($"/something .{Path.DirectorySeparatorChar}-Mercury.cs Mercury.cs \"Mer cury.cs\"");
ToolLocationHelper_Tests.cs (46)
1398string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1400string redist40Directory = Path.Combine(tempDirectory, "v4.0", "RedistList") + Path.DirectorySeparatorChar; 1440string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1470string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1500string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1529string redist40Directory = Path.Combine(tempDirectory, "v4.0", "RedistList") + Path.DirectorySeparatorChar; 1560string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1596string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1630string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar; 1673string framework41Directory = Path.Combine(tempDirectory, "MyFramework", "v4.1") + Path.DirectorySeparatorChar; 1677string framework40Directory = Path.Combine(tempDirectory, "MyFramework", "v4.0") + Path.DirectorySeparatorChar; 1681string framework39Directory = Path.Combine(tempDirectory, "MyFramework", "v3.9") + Path.DirectorySeparatorChar; 1739+ Path.DirectorySeparatorChar; 1796+ Path.DirectorySeparatorChar; 1801+ Path.DirectorySeparatorChar; 2690stdLibPaths[0].ShouldBe(Path.Combine(customFrameworkDir, frameworkName, frameworkVersionWithV) + Path.DirectorySeparatorChar, stdLibPaths[0]); 3004sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3006sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3035+ Path.DirectorySeparatorChar; 3548+ Path.DirectorySeparatorChar; 3550+ Path.DirectorySeparatorChar; 3617+ Path.DirectorySeparatorChar; 3619+ Path.DirectorySeparatorChar; 3795targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3796targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3798targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=2.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3802targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3804targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=3.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3806targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=4.0"].ShouldBe(Path.Combine(_fakeStructureRoot2, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "4.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3816targetPlatforms[key].ExtensionSDKs["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3820targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3822targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3826targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3828targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3831targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3835targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "8.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3839targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3844targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "9.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3848targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4064targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4067targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4070targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4073targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4076targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 4521Directory.CreateDirectory(Path.Combine(tempPath, "Windows", "v3.0") + Path.DirectorySeparatorChar); 4525Path.Combine(tempPath, "Windows", "NotAVersion") + Path.DirectorySeparatorChar);
Microsoft.CodeAnalysis (7)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (2)
191else if (Path.DirectorySeparatorChar == '/') 197else if (!sawStartChar && Path.DirectorySeparatorChar == '\\')
FileSystem\FileUtilities.cs (1)
272return NormalizeAbsolutePath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
FileSystem\PathUtilities.cs (1)
25internal static char DirectorySeparatorChar => Path.DirectorySeparatorChar;
InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
RuleSet\RuleSetInclude.cs (1)
98includePath = includePath.Replace('\\', Path.DirectorySeparatorChar);
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
151var folders = relativeDirectoryPath.Split([Path.DirectorySeparatorChar], StringSplitOptions.RemoveEmptyEntries);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
272return NormalizeAbsolutePath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
25internal static char DirectorySeparatorChar => Path.DirectorySeparatorChar;
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (5)
CommandLineIVTTests.cs (4)
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 (1)
6493baseDirectory: Path.DirectorySeparatorChar == '\\' ? @"c:\" : "/");
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
CsiTests.cs (1)
157+ <Initialize>.MoveNext(){string.Format(ScriptingResources.AtFileLine, $"{cwd}{Path.DirectorySeparatorChar}a.csx", "2")}
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\ReferenceManagerTests.cs (2)
839string[] parts = path.Split(Path.DirectorySeparatorChar); 846return newParts.Join(Path.DirectorySeparatorChar.ToString());
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveEvaluator.cs (1)
74Debug.Assert(languageInfo.InteractiveResponseFileName.IndexOfAny([Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar]) == -1);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorAnalyzerAssemblyResolver.cs (1)
87if (!Path.GetFileName(directory.AsSpan().TrimEnd(Path.DirectorySeparatorChar)).Equals(ServiceHubCoreFolderName, StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (2)
RazorAnalyzerAssemblyResolverTests.cs (2)
163coreTest(dir + Path.DirectorySeparatorChar, serviceHubFolder); 165coreTest(serviceHubFolder + Path.DirectorySeparatorChar, serviceHubFolder);
Microsoft.CodeAnalysis.Features (3)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (2)
29private static readonly string PathSeparatorString = Path.DirectorySeparatorChar.ToString(); 44var pathParts = referencedDllPath.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
151var folders = relativeDirectoryPath.Split([Path.DirectorySeparatorChar], StringSplitOptions.RemoveEmptyEntries);
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
272return NormalizeAbsolutePath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
25internal static char DirectorySeparatorChar => Path.DirectorySeparatorChar;
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
Microsoft.CodeAnalysis.LanguageServer (1)
Program.cs (1)
123Microsoft.CodeAnalysis.EditAndContinue.EditAndContinueMethodDebugInfoReader.IgnoreCaseWhenComparingDocumentNames = Path.DirectorySeparatorChar == '\\';
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\ProtocolConversions.cs (2)
236if (path[^1] == System.IO.Path.DirectorySeparatorChar) 241Debug.Assert(!path.Split(System.IO.Path.DirectorySeparatorChar).Any(p => p == "." || p == ".."));
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
AbstractResxGenerator.cs (1)
85resourceName = relativeDir.Replace(Path.DirectorySeparatorChar, '.').Replace(Path.AltDirectorySeparatorChar, '.') + resourceName;
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.CodeAnalysis.Test.Utilities (3)
Assert\ArtifactUploadUtil.cs (1)
98if (destFilePath.Length > 0 && destFilePath[0] == Path.DirectorySeparatorChar)
Assert\ConditionalFactAttribute.cs (1)
154public static bool IsWindows => Path.DirectorySeparatorChar == '\\';
DotNetCoreSdk.cs (1)
25var dotNetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
Microsoft.CodeAnalysis.UnitTests (1)
SourceFileResolverTest.cs (1)
22if (Path.DirectorySeparatorChar == '/')
Microsoft.CodeAnalysis.Workspaces (8)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
272return NormalizeAbsolutePath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
25internal static char DirectorySeparatorChar => Path.DirectorySeparatorChar;
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
Workspace\CommandLineProject.cs (1)
189private static readonly char[] s_folderSplitters = [Path.DirectorySeparatorChar];
Workspace\ProjectSystem\IFileChangeWatcher.cs (2)
34if (!path.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) 36path += System.IO.Path.DirectorySeparatorChar;
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1240fullPath.LastIndexOf(Path.DirectorySeparatorChar);
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.SolutionFilterReader.cs (2)
30var solutionPath = solution.GetProperty("path").GetString()?.Replace('\\', Path.DirectorySeparatorChar); 60var projectPath = project.GetString()?.Replace('\\', Path.DirectorySeparatorChar);
MSBuild\MSBuildProjectLoader.Worker.cs (1)
459private static readonly char[] s_directorySplitChars = [Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar];
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
272return NormalizeAbsolutePath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
25internal static char DirectorySeparatorChar => Path.DirectorySeparatorChar;
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
NetCoreTests.cs (1)
42var dotNetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
NewlyCreatedProjectsFromDotNetNew.cs (1)
243var dotNetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
Microsoft.DotNet.Arcade.Sdk (3)
src\GenerateSourcePackageSourceLinkTargetsFile.cs (2)
99return last == Path.DirectorySeparatorChar || last == Path.AltDirectorySeparatorChar; 103=> EndsWithSeparator(path) ? path : path + Path.DirectorySeparatorChar;
src\LocateDotNet.cs (1)
70var fileName = (Path.DirectorySeparatorChar == '\\') ? "dotnet.exe" : "dotnet";
Microsoft.DotNet.Arcade.Sdk.Tests (2)
GenerateSourcePackageSourceLinkTargetsFileTests.cs (1)
19path.Replace('\\', Path.DirectorySeparatorChar);
Utilities\TestApp.cs (1)
112var destFileName = Path.Combine(destDir, srcFileName.Substring(srcDir.Length).TrimStart(new[] { Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar }));
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PushToBuildStorage.cs (1)
551return targetPath.Substring(basePath.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateMD5SumsFile.cs (1)
41string relativePath = file.ItemSpec.Substring(RootDirectory.Length).TrimStart(Path.DirectorySeparatorChar).Replace('\\', '/');
Microsoft.DotNet.Build.Tasks.Packaging (6)
GenerateNuSpec.cs (1)
262Target = f.GetMetadata(Metadata.FileTarget).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar),
HarvestPackage.cs (1)
580var parts = path.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
NuGetPack.cs (4)
23@"**\*.pdb".Replace('\\', Path.DirectorySeparatorChar), 24@"src\**\*".Replace('\\', Path.DirectorySeparatorChar) 31@"content\**\*".Replace('\\', Path.DirectorySeparatorChar), 32@"tools\**\*.ps1".Replace('\\', Path.DirectorySeparatorChar)
Microsoft.DotNet.Build.Tasks.Workloads (2)
Utils.cs (2)
47return path.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar;
Microsoft.DotNet.Helix.Sdk (1)
CreateXHarnessAppleWorkItems.cs (1)
102appFolderPath = appFolderPath.TrimEnd(Path.DirectorySeparatorChar);
Microsoft.DotNet.SignCheckLibrary (1)
Verification\PkgVerifier.cs (1)
47var relativePath = path.Substring(extractionPath.Length + 1).Replace(Path.DirectorySeparatorChar, '/');
Microsoft.DotNet.SignTool (3)
src\SignToolTask.cs (1)
390return string.Join(Path.DirectorySeparatorChar.ToString(), result);
src\ZipData.cs (2)
342var relativePath = path.Substring(extractDir.Length + 1).Replace(Path.DirectorySeparatorChar, '/'); 368var relativePath = path.Substring(extractDir.Length + 1).Replace(Path.DirectorySeparatorChar, '/');
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WritePackageUsageData.cs (1)
268return path.Substring(RootDir.Length).Replace(Path.DirectorySeparatorChar, '/');
Microsoft.DotNet.XliffTasks (3)
Model\ResxDocument.cs (1)
65string resourceRelativePath = splitRelativePathAndSerializedType[0].Replace('\\', Path.DirectorySeparatorChar);
Model\VsctDocument.cs (1)
85string resourceRelativePath = hrefAttribute.Value.Replace('\\', Path.DirectorySeparatorChar);
Tasks\GatherTranslatedSource.cs (1)
52Path.DirectorySeparatorChar,
Microsoft.DotNet.XliffTasks.Tests (2)
ResxDocumentTests.cs (1)
57@"Resources\Package.ico".Replace('\\', Path.DirectorySeparatorChar));
VsctDocumentTests.cs (1)
79@"Resources\Images.png".Replace('\\', Path.DirectorySeparatorChar));
Microsoft.Extensions.AI.Templates.Tests (2)
AIChatWebSnapshotTests.cs (2)
71var verificationExcludePatterns = Path.DirectorySeparatorChar is '/' 73: _verificationExcludePatterns.Select(p => p.Replace('/', Path.DirectorySeparatorChar)).ToArray();
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\EmbeddedFilesManifest.cs (2)
16.Where(c => c != Path.DirectorySeparatorChar && c != Path.AltDirectorySeparatorChar).ToArray(); 18private static readonly char[] _separators = new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Microsoft.Extensions.FileProviders.Physical (6)
Internal\PathUtils.cs (4)
15.Where(c => c != Path.DirectorySeparatorChar && c != Path.AltDirectorySeparatorChar).ToArray(); 41{Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}; 46path[path.Length - 1] != Path.DirectorySeparatorChar) 48return path + Path.DirectorySeparatorChar;
PhysicalFileProvider.cs (1)
27{Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar};
PhysicalFilesWatcher.cs (1)
449(path[path.Length - 1] == Path.DirectorySeparatorChar ||
Microsoft.Extensions.FileSystemGlobbing (7)
InMemoryDirectoryInfo.cs (7)
18private static readonly char[] DirectorySeparators = new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; 49string normalizedRoot = Path.GetFullPath(rootDir.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); 54string fileWithNormalSeparators = file.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); 125(rootDir[rootDirLength - 1] == Path.DirectorySeparatorChar || 126filePath.IndexOf(Path.DirectorySeparatorChar, rootDirLength) == rootDirLength); 138string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); 150string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
Microsoft.Extensions.Localization (2)
ResourceManagerStringLocalizerFactory.cs (2)
49.Replace(Path.DirectorySeparatorChar, '.') + "."; 231.Replace(Path.DirectorySeparatorChar, '.')
Microsoft.Extensions.SecretManager.Tools.Tests (1)
SecretManagerTests.cs (1)
78secretManager.RunInternal("list", "-p", ".." + Path.DirectorySeparatorChar, "--verbose");
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsSrvServiceEndpointProviderFactory.cs (3)
17private static readonly string s_serviceAccountPath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount"); 18private static readonly string s_serviceAccountNamespacePath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount", "namespace"); 19private static readonly string s_resolveConfPath = Path.Combine($"{Path.DirectorySeparatorChar}etc", "resolv.conf");
Microsoft.Maui.Controls.SourceGen (4)
CodeBehindGenerator.cs (4)
286 var hintName = $"{(string.IsNullOrEmpty(Path.GetDirectoryName(projItem.TargetPath)) ? "" : Path.GetDirectoryName(projItem.TargetPath) + Path.DirectorySeparatorChar)}{Path.GetFileNameWithoutExtension(projItem.TargetPath)}.{projItem.Kind.ToLowerInvariant()}.sg.cs".Replace(Path.DirectorySeparatorChar, '_'); 633 var hintName = $"{(string.IsNullOrEmpty(Path.GetDirectoryName(projItem.TargetPath)) ? "" : Path.GetDirectoryName(projItem.TargetPath) + Path.DirectorySeparatorChar)}{Path.GetFileNameWithoutExtension(projItem.TargetPath)}.{projItem.Kind.ToLowerInvariant()}.sg.cs".Replace(Path.DirectorySeparatorChar, '_');
Microsoft.Maui.Essentials (3)
FileSystem\FileSystemUtils.shared.cs (3)
14 /// Forward and backward slashes will be replaced by <see cref="Path.DirectorySeparatorChar"/> 19 .Replace('\\', Path.DirectorySeparatorChar) 20 .Replace('/', Path.DirectorySeparatorChar);
Microsoft.Maui.Resizetizer (4)
GetMauiAssetPath.cs (4)
74 path?.Replace('\\', Path.DirectorySeparatorChar)?.Replace('/', Path.DirectorySeparatorChar); 82 if (!projectDirectory.EndsWith(Path.DirectorySeparatorChar.ToString())) 84 projectDirectory += Path.DirectorySeparatorChar;
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
223var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Microsoft.ML.Core (4)
Data\Repository.cs (4)
220protected static string NormalizeForArchiveEntry(string path) => path?.Replace('/', Path.DirectorySeparatorChar); 228path?.Replace('/', Path.DirectorySeparatorChar).Replace('\\', Path.DirectorySeparatorChar); 255_ectx.Check(entityPath.Length > ichSplit && entityPath[ichSplit] == Path.DirectorySeparatorChar);
Microsoft.ML.IntegrationTests (1)
ModelFiles.cs (1)
60var versionFileName = @"TrainingInfo" + Path.DirectorySeparatorChar + "Version.txt";
Microsoft.ML.Parquet (4)
PartitionedFileLoader.cs (1)
712truncPath = String.Join(Path.DirectorySeparatorChar.ToString(), segments);
PartitionedPathUtils.cs (3)
55relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); 68char[] separators = { Path.DirectorySeparatorChar }; 70var cleanPath = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
Microsoft.ML.PerformanceTests (2)
ImageClassificationBench.cs (2)
154destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 192var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Microsoft.ML.Samples (8)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
258destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 291var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
290destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 323var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
246destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 279var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
267destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 300var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Microsoft.ML.Samples.GPU (8)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
258destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 291var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
290destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 323var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
246destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 279var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
267destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 300var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
1976destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 2004var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
Microsoft.VisualBasic.Core (14)
Microsoft\VisualBasic\CompilerServices\IOUtils.vb (5)
26If PathName.Length > 0 AndAlso PathName.Chars(PathName.Length - 1) = Path.DirectorySeparatorChar Then 46If DirName.Chars(DirName.Length - 1) <> Path.DirectorySeparatorChar Then 47DirName = DirName & Path.DirectorySeparatorChar 51If DirName.Chars(DirName.Length - 1) <> Path.DirectorySeparatorChar Then 52DirName = DirName & Path.DirectorySeparatorChar
Microsoft\VisualBasic\FileIO\FileSystem.vb (9)
92(file.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) Or 247IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)) 852If path.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.Ordinal) Or 938If TargetDirectoryFullPath.Chars(SourceDirectoryFullPath.Length) = IO.Path.DirectorySeparatorChar Then 1538Path1 = Path1.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar) 1539Path2 = Path2.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar) 1560Path = Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar) 1582Return Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar) 2056IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar, IO.Path.VolumeSeparatorChar}
Microsoft.VisualBasic.Forms.Tests (2)
System\Windows\Forms\FileSystemProxyTests.vb (2)
181Dim expected As String = Path.GetTempPath.TrimEnd(Path.DirectorySeparatorChar) 410temp &= Path.DirectorySeparatorChar
Microsoft.VisualStudio.LanguageServices (3)
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
53private static readonly char[] PathSeparatorCharacters = [Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar];
Workspace\SourceGeneratedFileManager.cs (2)
124document.HintName.Replace('/', Path.DirectorySeparatorChar)); 178var separatorIndex = slice.IndexOf(Path.DirectorySeparatorChar);
MSBuild (15)
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar))); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
Modifiers.cs (1)
422modifiedItemSpec += Path.DirectorySeparatorChar;
MSBuildTaskHost (17)
Constants.cs (1)
132internal static readonly char[] DirectorySeparatorChar = [Path.DirectorySeparatorChar];
FileUtilities.cs (14)
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString(); 237fileSpec += Path.DirectorySeparatorChar; 277path.Substring(start) + Path.DirectorySeparatorChar); 370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar); 400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) 566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/"); 728directory += Path.DirectorySeparatorChar; 797fullPath += Path.DirectorySeparatorChar; 1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar) 1212sb.Append("..").Append(Path.DirectorySeparatorChar); 1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar); 1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar) 1337var separator = Path.DirectorySeparatorChar; 1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
InterningWriteTranslator.cs (1)
28private static readonly char[] DirectorySeparatorChars = [Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar];
Modifiers.cs (1)
422modifiedItemSpec += Path.DirectorySeparatorChar;
PresentationBuildTasks (27)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (4)
63_sourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar; 264if (!_outputDir.EndsWith(string.Empty + Path.DirectorySeparatorChar, StringComparison.Ordinal)) 266_outputDir += Path.DirectorySeparatorChar; 1077int pathEndIndex = fullFilePath.LastIndexOf(Path.DirectorySeparatorChar);
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (4)
49_sourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar; 243if (!_outputPath.EndsWith(string.Empty + Path.DirectorySeparatorChar, StringComparison.Ordinal)) 245_outputPath += Path.DirectorySeparatorChar; 540int pathEndIndex = fullFilePath.LastIndexOf(Path.DirectorySeparatorChar);
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (3)
127SourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar; 254if (!_outputPath.EndsWith((Path.DirectorySeparatorChar).ToString(), StringComparison.Ordinal)) 255_outputPath += Path.DirectorySeparatorChar;
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
155string sourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar;
MS\Internal\MarkupCompiler\MarkupCompiler.cs (8)
472if (!TargetPath.EndsWith(string.Empty + Path.DirectorySeparatorChar, StringComparison.Ordinal)) 474TargetPath += Path.DirectorySeparatorChar; 478int pathEndIndex = SourceFileInfo.RelativeSourceFilePath.LastIndexOf(Path.DirectorySeparatorChar); 1609return path.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar; 1618string[] dirs = relPath.Split(Path.DirectorySeparatorChar); 2648Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar, 3353relPath = TaskHelper.GetRootRelativePath(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar, fullFilePath);
MS\Internal\MarkupCompiler\PathInternal.cs (3)
89sb.Append(Path.DirectorySeparatorChar); 110sb.Append(Path.DirectorySeparatorChar); 125return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
MS\Internal\Tasks\CompilerWrapper.cs (2)
38_sourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar; 419int pathEndIndex = fullFilePath.LastIndexOf(Path.DirectorySeparatorChar);
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
486string curDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar;
MS\Internal\Tasks\TaskHelper.cs (1)
94string sourceDir = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar;
PresentationCore (4)
MS\Internal\FontCache\DWriteFactory.cs (3)
63localPath = Directory.GetParent(fontCollectionUri.LocalPath).FullName + Path.DirectorySeparatorChar; 71if (string.Equals((localPath.Length > 0 && localPath[localPath.Length - 1] != Path.DirectorySeparatorChar) ? localPath + Path.DirectorySeparatorChar : localPath, Util.WindowsFontsUriObject.LocalPath, StringComparison.OrdinalIgnoreCase))
MS\Internal\FontCache\FontSourceCollection.cs (1)
74_isFileSystemFolder = localPath[localPath.Length - 1] == Path.DirectorySeparatorChar;
PresentationUI (1)
MS\Internal\Documents\Application\DocumentStream.cs (1)
820Path.DirectorySeparatorChar,
Replay (3)
src\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs (2)
21public static bool IsWindows => Path.DirectorySeparatorChar == '\\'; 23public static bool IsUnix => Path.DirectorySeparatorChar == '/';
src\Compilers\Shared\BuildServerConnection.cs (1)
570clientDirectory = clientDirectory.TrimEnd(Path.DirectorySeparatorChar);
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
StaticFilesAuth (1)
Startup.cs (1)
55|| directory.FullName.StartsWith(userPath + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
System.Configuration.ConfigurationManager (1)
System\Diagnostics\TraceUtils.cs (1)
74if ((initializeData[0] != Path.DirectorySeparatorChar) && (initializeData[0] != Path.AltDirectorySeparatorChar) && !Path.IsPathRooted(initializeData))
System.Formats.Tar (2)
System\Formats\Tar\TarHeader.Write.cs (1)
1193$"{dirName}/PaxHeaders.{Environment.ProcessId}/{fileName}{Path.DirectorySeparatorChar}" :
System\Formats\Tar\TarHelpers.cs (1)
469=> c == Path.DirectorySeparatorChar;
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
130_externalFileAttr = entryName.EndsWith(Path.DirectorySeparatorChar) || entryName.EndsWith(Path.AltDirectorySeparatorChar)
System.IO.Compression.ZipFile (2)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
116if (!destinationDirectoryFullPath.EndsWith(Path.DirectorySeparatorChar)) 118char sep = Path.DirectorySeparatorChar;
System.IO.FileSystem.Watcher (2)
System\IO\FileSystemWatcher.Linux.cs (2)
973if (c != System.IO.Path.DirectorySeparatorChar && c != System.IO.Path.AltDirectorySeparatorChar) 975builder.Append(System.IO.Path.DirectorySeparatorChar);
System.IO.IsolatedStorage (3)
System\IO\IsolatedStorage\IsolatedStorage.cs (1)
115get { return Path.DirectorySeparatorChar; }
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
548if (partialPath[i] != Path.DirectorySeparatorChar && partialPath[i] != Path.AltDirectorySeparatorChar)
System\IO\IsolatedStorage\IsolatedStorageFile.NonMobile.cs (1)
74return Path.GetDirectoryName(RootDirectory.TrimEnd(Path.DirectorySeparatorChar));
System.IO.Pipes (1)
System\IO\Pipes\PipeStream.Unix.cs (1)
205if (pipeName.AsSpan().ContainsAny(s_invalidPathNameChars) || pipeName.EndsWith(Path.DirectorySeparatorChar))
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (1)
77if (Path.DirectorySeparatorChar != '\\' && expression.AsSpan().ContainsAny(@"\""<>"))
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (4)
609destination[path1.Length] = DirectorySeparatorChar; 643destination[charsWritten++] = DirectorySeparatorChar; 919sb.Append(DirectorySeparatorChar); 940sb.Append(DirectorySeparatorChar);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
163if (unmanagedDllName.Contains(Path.DirectorySeparatorChar))
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\LibraryNameVariation.Unix.cs (1)
36bool containsDelim = libName.Contains(Path.DirectorySeparatorChar);
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
91Path.DirectorySeparatorChar,
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
620else if (!tzDirectory.EndsWith(Path.DirectorySeparatorChar))
src\System\Reflection\RuntimeModule.cs (1)
500int i = s.LastIndexOf(IO.Path.DirectorySeparatorChar);
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Modules\RoModule.cs (1)
53int i = s.LastIndexOf(Path.DirectorySeparatorChar);
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
27char sep = Path.DirectorySeparatorChar;
System.Windows.Forms (4)
System\Resources\ResXFileRef.cs (3)
67if (path1[i] == Path.DirectorySeparatorChar) 87if (path1[i] == Path.DirectorySeparatorChar) 89relPath.Append($"..{Path.DirectorySeparatorChar}");
System\Resources\ResXResourceWriter.cs (1)
313: $"{BasePath}{Path.DirectorySeparatorChar}";
System.Windows.Forms.Analyzers.Tests (2)
TestFileLoader.cs (2)
25builder.Append(Path.DirectorySeparatorChar); 27builder.Append(Path.DirectorySeparatorChar);
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
443Debug.Assert(!assemblyPath.EndsWith(string.Empty + Path.DirectorySeparatorChar, StringComparison.Ordinal), "the assembly path should be a full file path containing file extension");
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PathHelper.cs (1)
14private static readonly char[] DirectorySeparatorCharacters = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
vbc (2)
src\Compilers\Shared\BuildClient.cs (1)
49internal static bool IsRunningOnWindows => Path.DirectorySeparatorChar == '\\';
src\Compilers\Shared\BuildServerConnection.cs (1)
570clientDirectory = clientDirectory.TrimEnd(Path.DirectorySeparatorChar);
VBCSCompiler (2)
src\Compilers\Shared\BuildClient.cs (1)
49internal static bool IsRunningOnWindows => Path.DirectorySeparatorChar == '\\';
src\Compilers\Shared\BuildServerConnection.cs (1)
570clientDirectory = clientDirectory.TrimEnd(Path.DirectorySeparatorChar);
VBCSCompiler.UnitTests (7)
BuildClientTests.cs (7)
332var path = string.Format(@"q:{0}the{0}path", Path.DirectorySeparatorChar); 335Assert.Equal(name, BuildServerConnection.GetPipeName(path + Path.DirectorySeparatorChar)); 336Assert.Equal(name, BuildServerConnection.GetPipeName(path + Path.DirectorySeparatorChar + Path.DirectorySeparatorChar)); 342var path = string.Format(@"q:{0}the{0}path", Path.DirectorySeparatorChar); 351var path1 = string.Format(@"q:{0}the{0}path", Path.DirectorySeparatorChar); 352var path2 = string.Format(@"Q:{0}The{0}Path", Path.DirectorySeparatorChar);
xunit.console (2)
ConsoleRunner.cs (2)
61if (!defaultDirectory.EndsWith(new string(new[] { Path.DirectorySeparatorChar }), StringComparison.Ordinal)) 62defaultDirectory += Path.DirectorySeparatorChar;