32 references to Utilities
Microsoft.Build.Tasks.CodeAnalysis (11)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (1)
268bool flagSet = Utilities.TryConvertItemMetadataToBool(parameter, metadataNames[i]);
src\Compilers\Core\MSBuildTask\Csc.cs (2)
346bool embed = Utilities.TryConvertItemMetadataToBool(reference, 387throw Utilities.GetLocalizedArgumentException(
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1089item.ItemSpec = Utilities.GetFullPathNoThrow(item.ItemSpec);
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (1)
174if (containingRoot != null && topLevelMappedPaths.TryGetValue(Utilities.FixFilePath(containingRoot), out var mappedTopLevelPath))
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
50throw Utilities.GetLocalizedArgumentException( 76throw Utilities.GetLocalizedArgumentException(
src\Compilers\Core\MSBuildTask\Vbc.cs (4)
324Utilities.DeleteNoThrow(desiredPdbInfo.FullName); 332catch (Exception e) when (Utilities.IsIoRelatedException(e)) 373throw Utilities.GetLocalizedArgumentException(e, 566bool embed = Utilities.TryConvertItemMetadataToBool(reference, "EmbedInteropTypes");
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (21)
MapSourceRootTests.cs (21)
60Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec); 63Assert.Equal(Utilities.FixFilePath(@"/packages/SourcePackage2/"), task.MappedSourceRoots[1].ItemSpec); 66Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[2].ItemSpec); 70Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[3].ItemSpec); 109Assert.Equal(Utilities.FixFilePath(@"!@#:;$%^&*()_+|{}\"), task.MappedSourceRoots[0].ItemSpec); 112Assert.Equal(Utilities.FixFilePath("****/"), task.MappedSourceRoots[1].ItemSpec); 116Assert.Equal(Utilities.FixFilePath(@"****\|||:;\"), task.MappedSourceRoots[2].ItemSpec); 186Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[0].ItemSpec); 189Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\a\"), task.MappedSourceRoots[1].ItemSpec); 192Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[2].ItemSpec); 195Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\c\"), task.MappedSourceRoots[3].ItemSpec); 224Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec); 227Assert.Equal(Utilities.FixFilePath(@"C:\packages\SourcePackage1\"), task.MappedSourceRoots[1].ItemSpec); 230Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage2\"), task.MappedSourceRoots[2].ItemSpec); 241var path1 = Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\1\"); 242var path2 = Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\2\"); 243var path3 = Utilities.FixFilePath(@"c:\MyProjects\MyProject\"); 284var path1 = Utilities.FixFilePath(@"c:\packages\SourcePackage1\"); 285var path2 = Utilities.FixFilePath(@"c:\packages\SourcePackage2\"); 286var path3 = Utilities.FixFilePath(@"c:\packages\SourcePackage3\"); 420var path1 = Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\");