42 references to GetFullPathNoThrow
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1099
item.ItemSpec = Utilities.
GetFullPathNoThrow
(item.ItemSpec);
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
78
return string.IsNullOrEmpty(path) ? path : EnsureEndsWithSlash(Utilities.
GetFullPathNoThrow
(path));
189
var fullOriginalPath = Utilities.
GetFullPathNoThrow
(combinedPath);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (39)
MapSourceRootTests.cs (39)
60
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\packages\SourcePackage1\")), task.MappedSourceRoots[0].ItemSpec);
63
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath("/packages/SourcePackage2/")), task.MappedSourceRoots[1].ItemSpec);
66
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\")), task.MappedSourceRoots[2].ItemSpec);
70
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\")), task.MappedSourceRoots[3].ItemSpec);
109
Assert.Equal(Utilities.FixFilePath(Utilities.
GetFullPathNoThrow
(@"!@#:;$%^&*()_+|{}\")), task.MappedSourceRoots[0].ItemSpec);
112
Assert.Equal(Utilities.FixFilePath(Utilities.
GetFullPathNoThrow
("****/")), task.MappedSourceRoots[1].ItemSpec);
116
Assert.Equal(Utilities.FixFilePath(Utilities.
GetFullPathNoThrow
(@"****\|||:;\")), task.MappedSourceRoots[2].ItemSpec);
186
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\")), task.MappedSourceRoots[0].ItemSpec);
189
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\a\")), task.MappedSourceRoots[1].ItemSpec);
192
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\")), task.MappedSourceRoots[2].ItemSpec);
195
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\c\")), task.MappedSourceRoots[3].ItemSpec);
224
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\packages\SourcePackage1\")), task.MappedSourceRoots[0].ItemSpec);
227
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"C:\packages\SourcePackage1\")), task.MappedSourceRoots[1].ItemSpec);
230
Assert.Equal(Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\packages\SourcePackage2\")), task.MappedSourceRoots[2].ItemSpec);
269
"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", Utilities.
GetFullPathNoThrow
(path2))) + Environment.NewLine +
271
"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1))) + Environment.NewLine, engine.Log);
330
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "SourceControl", "git", "tfvc")) + Environment.NewLine +
332
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "RevisionId", "RevId1", "RevId2")) + Environment.NewLine +
334
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "NestedRoot", "NR1A", "NR1B")) + Environment.NewLine +
336
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "ContainingRoot", path3, "CR")) + Environment.NewLine +
338
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "MappedPath", "MP1", "MP2")) + Environment.NewLine +
340
"MapSourceRoots.ContainsDuplicate", "SourceRoot", Utilities.
GetFullPathNoThrow
(path1), "SourceLinkUrl", "URL1", "URL2")) + Environment.NewLine,
346
$"'{Utilities.
GetFullPathNoThrow
(path1)}' SourceControl='git' RevisionId='RevId1' NestedRoot='NR1A' ContainingRoot='{(deterministic ? Utilities.
GetFullPathNoThrow
(path3) : path3)}' MappedPath='{(deterministic ? "/_/NR1A/" : Utilities.
GetFullPathNoThrow
(path1))}' SourceLinkUrl='URL1'",
347
$"'{Utilities.
GetFullPathNoThrow
(path2)}' SourceControl='git' RevisionId='' NestedRoot='NR2' ContainingRoot='{(deterministic ? Utilities.
GetFullPathNoThrow
(path3) : path3)}' MappedPath='{(deterministic ? "/_/NR2/" : Utilities.
GetFullPathNoThrow
(path2))}' SourceLinkUrl=''",
348
$"'{Utilities.
GetFullPathNoThrow
(path3)}' SourceControl='' RevisionId='' NestedRoot='' ContainingRoot='' MappedPath='{(deterministic ? "/_/" : Utilities.
GetFullPathNoThrow
(path3))}' SourceLinkUrl=''",
378
"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", Utilities.
GetFullPathNoThrow
(Utilities.FixFilePath(@"c:\MyProjects\MyProject\")))) + Environment.NewLine, engine.Log);
451
$"'{Utilities.
GetFullPathNoThrow
(path1)}' SourceControl='' RevisionId='' NestedRoot='a/b' ContainingRoot='{(deterministic ? Utilities.
GetFullPathNoThrow
(path1) : path1)}' MappedPath='{Utilities.
GetFullPathNoThrow
(path1)}' SourceLinkUrl=''",
486
var expectedMappedPath1 = deterministic ? "/_/" : Utilities.
GetFullPathNoThrow
(normalizedPath1);
488
var expectedContainingRoot = deterministic ? Utilities.
GetFullPathNoThrow
(normalizedPath1) : originalPath1;
489
var expectedMappedPath2 = deterministic ? "/_/e/" : Utilities.
GetFullPathNoThrow
(normalizedPath2);
494
'{Utilities.
GetFullPathNoThrow
(normalizedPath1)}' SourceControl='' RevisionId='' NestedRoot='' ContainingRoot='' MappedPath='{expectedMappedPath1}' SourceLinkUrl=''
495
'{Utilities.
GetFullPathNoThrow
(normalizedPath2)}' SourceControl='' RevisionId='' NestedRoot='{expectedNestedRoot}' ContainingRoot='{expectedContainingRoot}' MappedPath='{expectedMappedPath2}' SourceLinkUrl=''