479 references to Path
InteractiveHost.UnitTests (4)
InteractiveHostCoreInitTests.cs (1)
75AssertEx.AssertEqualToleratingWhitespaceDifferences(PrintSearchPaths(srcDir.Path), output);
InteractiveHostDesktopInitTests.cs (1)
48AssertEx.AssertEqualToleratingWhitespaceDifferences(PrintSearchPaths(srcDir.Path), output);
InteractiveHostDesktopTests.cs (2)
704rspFile.WriteAllText($"/lib:{directory1.Path} /r:Assembly2.dll {initFile.Path}"); 718var expectedSearchPaths = PrintSearchPaths(fxDir, directory1.Path);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (19)
CopyRefAssemblyTests.cs (2)
35SourcePath = Path.Combine(dir.Path, "does_not_exist.dll") 66var dest = Path.Combine(dir.Path, "dest.dll");
DotNetSdkTests.cs (8)
28var root1 = Path.GetFullPath(ProjectDir.Path + Path.DirectorySeparatorChar); 29var root2 = Path.GetFullPath(sourcePackageDir.Path + Path.DirectorySeparatorChar); 38var sourceLinkJsonPath = Path.Combine(ObjDir.Path, ProjectName + ".sourcelink.json"); 432Path.Combine(ProjectDir.Path, ".editorconfig"), 493Path.Combine(ProjectDir.Path, ".editorconfig"), 528Path.Combine(ProjectDir.Path, ".editorconfig"), 573var dir = Directory.GetParent(ProjectDir.Path); 653Path.Combine(ProjectDir.Path, ".editorconfig"),
IntegrationTests.cs (3)
87currentDirectory.Path, 93return new DisposableFile(Path.Combine(directory.Path, resultFileName)); 782var result = RunCommandLineCompiler(_msbuildExecutable, "/p:UseSharedCompilation=false", testDir.Path);
TestUtilities\DotNetSdkTestBase.cs (6)
196Assert.True(File.Exists(Path.Combine(ObjDir.Path, "project.assets.json"))); 197Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.props"))); 198Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.targets"))); 221var evaluationResultsFile = Path.Combine(OutDir.Path, "EvaluationResult.txt"); 223EmitTestHelperProps(ObjDir.Path, ProjectFileName, customProps, uploadUtil); 224EmitTestHelperTargets(ObjDir.Path, evaluationResultsFile, ProjectFileName, expressions, customTargets, uploadUtil);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (113)
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)}";
CommandLineTestBase.cs (2)
41File.WriteAllBytes(Path.Combine(dir.Path, "mscorlib.dll"), Net461.ReferenceInfos.mscorlib.ImageBytes); 42return dir.Path;
CommandLineTests.cs (84)
146var cmd = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/errorlog:errorlog", $"/doc:{docName}", "/warnaserror", src.Path }); 153string exePath = Path.Combine(dir.Path, "temp.exe"); 166var cmd = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/t:library", "/preferreduilang:en", $"/doc:{docName}", src.Path }); 173var xmlPath = Path.Combine(dir.Path, docName); 195var cmd = CreateCSharpCompiler(null, dir.Path, new[] { 288var cmd = CreateCSharpCompiler(null, dir.Path, new[] { 340var cmd = CreateCSharpCompiler(null, dir.Path, new[] { 376var cmd = CreateCSharpCompiler(null, dir.Path, new[] { 389$"error CS8700: Multiple analyzer config files cannot be in the same directory ('{dir.Path}').", 400var cmd = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", src.Path }); 409var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path); 411Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932))); 420var cmd = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/codepage:932", src.Path }); 429var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path); 431Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932))); 477string basePath = baseDir.Path; 490{ Path.Combine(dirSubDir.Path, @"b.rsp"), @" 565var parser = CSharpCommandLineParser.Default.Parse(new[] { "file.cs", $"-out:{parentDir.Path}", "/noSdkPath" }, parentDir.Path, null); 583var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/nosdkpath", "/r:System.dll", "a.cs" }); 622args = DefaultParse(new[] { "/main:Test", "a.cs" }, folder.Path); 626args = DefaultParse(new[] { "/main:\"Test\"", "a.cs" }, folder.Path); 630args = DefaultParse(new[] { "/main:\"Test.Class1\"", "a.cs" }, folder.Path); 634args = DefaultParse(new[] { "/m:Test", "a.cs" }, folder.Path); 638args = DefaultParse(new[] { "/m:\"Test\"", "a.cs" }, folder.Path); 642args = DefaultParse(new[] { "/m:\"Test.Class1\"", "a.cs" }, folder.Path); 647args = DefaultParse(new[] { "/m:\"решения.Class1\"", "a.cs" }, folder.Path); 659args = DefaultParse(new[] { "-debug+/debug:portable" }, folder.Path); 691int exitCode = CreateCSharpCompiler(null, folder.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", @"/recurse:.", "/out:abc.dll" }).Run(outWriter); 696exitCode = CreateCSharpCompiler(null, folder.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", @"/recurse:. ", "/out:abc.dll" }).Run(outWriter); 701exitCode = CreateCSharpCompiler(null, folder.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", @"/recurse: . ", "/out:abc.dll" }).Run(outWriter); 706exitCode = CreateCSharpCompiler(null, folder.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", @"/recurse:././.", "/out:abc.dll" }).Run(outWriter); 713args = DefaultParse(new[] { @"/recurse:*.cp*", @"/recurse:a\*.c*", @"/out:a.dll" }, folder.Path); 716AssertEx.Equal(new[] { folder.Path + @"\c.cpp", folder.Path + @"\B\B_c.cpx", folder.Path + @"\a\A_a.cs", folder.Path + @"\a\A_b.cs", }, resolvedSourceFiles); 718args = DefaultParse(new[] { @"/recurse:.\\\\\\*.cs", @"/out:a.dll" }, folder.Path); 723args = DefaultParse(new[] { @"/recurse:.////*.cs", @"/out:a.dll" }, folder.Path); 1876var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/langversion:?" }); 2250var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/debug:embedded", "/sourcelink:sl.json", "a.cs" }); 2254var peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe")); 2282var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/debug:portable", "/sourcelink:sl.json", "a.cs" }); 2286var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb")); 2311var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/debug:full", "/sourcelink:sl.json", "a.cs" }); 2315var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb")); 2454var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", debugSwitch, embedSwitch, "embed.cs", "embed2.cs" }); 2478using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe")))) 2485MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")))) 2513symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))); 9293TestCS2002(commandLineArgs, tempDir.Path, 0, aWrnString); 9299TestCS2002(commandLineArgs, tempDir.Path, 0, warnings); 9305TestCS2002(commandLineArgs, tempDir.Path, 0, AWrnString); 9311TestCS2002(commandLineArgs, tempDir.Path, 0, String.Empty); 9317TestCS2002(commandLineArgs, tempParentDir.Path, 0, tmpDiraString); 9322TestCS2002(commandLineArgs, tempParentDir.Path, 0, tmpDiraString); 9327TestCS2002(commandLineArgs, tempParentDir.Path, 0, tmpDiraString); 9332TestCS2002(commandLineArgs, tempParentDir.Path, 0, tmpDiraString); 9336TestCS2002(commandLineArgs, tempParentDir.Path, 0, tmpDiraString); 9342var formattedcs1504Str = String.Format(cs1504, PathUtilities.CombineAbsoluteAndRelativePaths(tempParentDir.Path, "tmpDir\a.cs"), "Illegal characters in path."); 9343TestCS2002(commandLineArgs, tempParentDir.Path, 1, formattedcs1504Str); 9351TestCS2002(commandLineArgs, tempParentDir.Path, 1, (string[])null, parseDiags); 9358TestCS2002(commandLineArgs, tempParentDir.Path, 1, (string[])null, parseDiags); 9362var formattedcs1504 = String.Format(cs1504, PathUtilities.CombineAbsoluteAndRelativePaths(tempParentDir.Path, @":a.cs"), @"The given path's format is not supported."); 9363TestCS2002(commandLineArgs, tempParentDir.Path, 1, formattedcs1504); 9366System.IO.Directory.Delete(tempParentDir.Path, true); 10588var csc = CreateCSharpCompiler(null, sourceDir.Path, args, analyzers: analyzers, generators: generators, driverCache: driverCache); 11626var csc = CreateCSharpCompiler(null, dir.Path, args); 11630var exePath = Path.Combine(dir.Path, "a.exe"); 11642var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11649var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11650AssertPdbEmit(dir, pdbPath, @"q:\a.pdb", $@"/pathmap:{dir.Path}=q:\"); 11656var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11657AssertPdbEmit(dir, pdbPath, @"q:\a.pdb", $@"/pathmap:{dir.Path}=q:\", "/deterministic"); 11664var pdbPath = Path.Combine(dir.Path, @"pdb\a.pdb"); 11665AssertPdbEmit(dir, pdbPath, @"q:\pdb\a.pdb", $@"/pathmap:{dir.Path}=q:\"); 11671var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11678var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11679AssertPdbEmit(dir, pdbPath, @"/a.pdb", $@"/pathmap:{dir.Path}=/"); 11685var pdbPath = Path.Combine(dir.Path, "a.pdb"); 11686AssertPdbEmit(dir, pdbPath, "/goo/a.pdb", $"/pathmap:{dir.Path}=/goo,{dir.Path}{PathUtilities.DirectorySeparatorChar}=/bar");
SarifErrorLoggerTests.cs (10)
43var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 74var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 108var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 140var errorLogFile = Path.Combine(outputDir.Path, "ErrorLog.txt"); 141var outputFilePath = Path.Combine(outputDir.Path, "test.dll"); 177var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 212var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 247var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 282var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 315var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
SarifV2ErrorLoggerTests.cs (8)
447var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 529var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 599var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 669Assert.False(File.Exists(Path.Combine(mappedDir.Path, "otherfile.cs"))); 674#line 123 "{{mappedDir.Path}}\otherfile.cs" 679var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt"); 713Assert.Equal($"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)resultFile["uri"]); 739Assert.Equal(expected: $"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)physicalLocation["artifactLocation"]["uri"]);
TouchedFileLoggingTests.cs (5)
40var touchedBase = Path.Combine(touchedDir.Path, "touched"); 68var touchedBase = Path.Combine(touchedDir.Path, "touched"); 115var touchedBase = Path.Combine(touchedDir.Path, "touched"); 154var touchedBase = Path.Combine(touchedDir.Path, "touched"); 161"/touchedfiles:" + touchedDir.Path + "\\touched",
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
1134var analyzerConfigPath = PathUtilities.CombineAbsoluteAndRelativePaths(Temp.CreateDirectory().Path, ".editorconfig"); 1379var analyzerConfigDocFilePath = PathUtilities.CombineAbsoluteAndRelativePaths(Temp.CreateDirectory().Path, ".editorconfig");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (15)
Emit\CompilationEmitTests.cs (2)
4634var dllPath = Path.Combine(tmpDir.Path, "assemblyname.dll"); 4635var pdbPath = Path.Combine(tmpDir.Path, "assemblyname.pdb");
Emit\DesktopStrongNameProviderTests.cs (13)
23var provider = new DesktopStrongNameProvider(tempPath: tempDir.Path); 24Assert.Equal(tempDir.Path, provider.FileSystem.GetSigningTempPath()); 38var provider1 = new DesktopStrongNameProvider(tempPath: tempDir.Path); 39var provider2 = new DesktopStrongNameProvider(tempPath: tempDir.Path); 48var provider1 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path]); 49var provider2 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path]); 58var provider1 = new DesktopStrongNameProvider(tempPath: tempDir.Path); 59var provider2 = new DesktopStrongNameProvider(tempPath: tempDir.Path + "2"); 68var provider1 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path]); 69var provider2 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path + "2"]); 78var provider1 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path]); 79var provider2 = new DesktopStrongNameProvider(keyFileSearchPaths: [tempDir.Path.ToUpper()]); 93var provider = new DesktopStrongNameProvider(ImmutableArray<string>.Empty, new VirtualizedStrongNameFileSystem(tempDir.Path));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Attributes\AttributeTests_Security.cs (4)
1502var resolver = new XmlFileResolver(tempDir.Path); 1585var resolver = new XmlFileResolver(tempDir.Path); 1606string filePath = Path.Combine(tempDir.Path, "pset_01.xml"); 1629TestOptions.ReleaseDll.WithXmlReferenceResolver(new XmlFileResolver(tempDir.Path)));
Attributes\EmitTestStrongNameProvider.cs (1)
25var fileSystem = new TestStrongNameFileSystem(_signingTempDirectory.Path)
Attributes\InternalsVisibleToAndStrongNameTests.cs (3)
65new DesktopStrongNameProvider(ImmutableArray.Create(keyFilePath), strongNameFileSystem: new VirtualizedStrongNameFileSystem(_signingTempDirectory.Path)); 230new VirtualizedStrongNameFileSystem(_signingTempDirectory.Path)) 2857var provider = new TestDesktopStrongNameProvider(fileSystem: new VirtualizedStrongNameFileSystem(_signingTempDirectory.Path))
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (15)
CommandLineRunnerTests.cs (14)
385workingDirectory: dir.Path); 488var scriptPath = PathUtilities.CombinePathsUnchecked(PathUtilities.GetFileName(directory.Path), scriptName); 489var workingDirectory = PathUtilities.GetDirectoryName(directory.Path); 543var runner = CreateRunner([$"/loadpath:{dir1.Path}", $"/loadpaths:{dir2.Path};{dir3.Path}", main.Path]); 580var runner = CreateRunner(["/r:4.dll", $"/lib:{dir1.Path}", $"/libpath:{dir2.Path}", $"/libpaths:{dir3.Path};{dir4.Path}", main.Path]); 601SourcePaths.Add(@""{dir.Path}"") 616> SourcePaths.Add(@""{dir.Path}"") 637ReferencePaths.Add(@""{dir.Path}"") 652> ReferencePaths.Add(@""{dir.Path}"")
InteractiveSessionReferencesTests.cs (1)
145File.Move(libBFile.Path, Path.Combine(dir.Path, "libB.dll"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
DocumentationComments\DocumentationCommentCompilerTests.cs (2)
3659var resolver = new XmlFileResolver(rootDir.Path); 7600var path = dir.Path;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Emit\CompilationOutputFilesTests.cs (1)
57Directory.Delete(dir.Path, recursive: true);
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
121AddDocument(CreateDesignTimeOnlyDocument(projectPId, name: "dt1.cs", path: Path.Combine(dir.Path, "dt1.cs"))). 390var designTimeOnlyFilePath = Path.Combine(dir.Path, designTimeOnlyFileName);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
LspFileChangeWatcherTests.cs (2)
64var context = lspFileChangeWatcher.CreateContext([new ProjectSystem.WatchedDirectory(tempDirectory.Path, extensionFilters: [])]); 69Assert.Equal(tempDirectory.Path, watcher.GlobPattern.Second.BaseUri.Second.LocalPath);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
412var fileSystem = new TestStrongNameFileSystem(temp.CreateDirectory().Path);
Microsoft.CodeAnalysis.Scripting.UnitTests (4)
RuntimeMetadataReferenceResolverTests.cs (4)
31new RelativePathResolver(ImmutableArray.Create(directory.Path), directory.Path), 51searchPaths: ImmutableArray.Create(directory.Path), 52baseDirectory: directory.Path);
Microsoft.CodeAnalysis.Test.Utilities (4)
AssemblyLoadTestFixture.cs (1)
23public string TempDirectory => _directory.Path;
TempFiles\DisposableDirectory.cs (3)
21if (Path != null && Directory.Exists(Path)) 25Directory.Delete(Path, recursive: true);
Microsoft.CodeAnalysis.UnitTests (12)
Analyzers\AnalyzerFileReferenceAppDomainTests.cs (4)
49var loadDomain = AppDomainUtils.Create("AnalyzerTestDomain", basePath: dir.Path); 54var exception = remoteTest.LoadAnalyzer(dir.CreateDirectory("shadow").Path, analyzerFile.Path); 107var loadDomain = AppDomainUtils.Create("AnalyzerTestDomain", basePath: dir.Path); 112var exception = remoteTest.LoadAnalyzer(dir.CreateDirectory("shadow").Path, analyzerFile.Path);
Analyzers\AnalyzerFileReferenceTests.cs (5)
320new BuildPaths(clientDir: directory.Path, workingDir: directory.Path, sdkDir: null, tempDir: null), 349new BuildPaths(clientDir: directory.Path, workingDir: directory.Path, sdkDir: null, tempDir: null), 482var generatorPath = Path.Combine(directory.Path, $"generator_{targetFramework}.dll");
FileSystem\RelativePathResolverTests.cs (2)
171ImmutableArray.Create(dir1.Path, dir2.Path),
InvokeUtil.cs (1)
101AnalyzerTestKind.ShadowLoad => new ShadowCopyAnalyzerAssemblyLoader(tempRoot.CreateDirectory().Path, externalResolvers.ToImmutableArray()),
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (211)
CommandLineIVTTests.vb (5)
34dir.Path, 135dir.Path, 236dir.Path, 347dir.Path, 465dir.Path,
CommandLineTests.vb (198)
77Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 114Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 172Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 209Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 222$"vbc : error BC37317: Multiple analyzer config files cannot be in the same directory ('{dir.Path}').", 239Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/errorlog:errorlog", $"/doc:{docName}", "/warnaserror", src.Path}) 246Dim exePath = Path.Combine(dir.Path, "temp.exe") 258Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/t:library", "/preferreduilang:en", $"/doc:{docName}", src.Path}) 265Dim xmlPath = Path.Combine(dir.Path, docName) 314args = DefaultParse({"-debug+/debug:portable"}, folder.Path) 387Dim cmd = New MockVisualBasicCompiler(dir.Path, {"/nologo", "a.vb", "/keyfile:key.snk"}) 406Dim cmd = New MockVisualBasicCompiler(dir.Path, {"/nologo", "a.vb", "/keycontainer:aaa"}) 425Dim cmd = New MockVisualBasicCompiler(dir.Path, {"/nologo", "a.vb", "/features:UseLegacyStrongNameProvider"}) 648Dim tempDir As String = Temp.CreateDirectory().Path 688Dim tempDir As String = Temp.CreateDirectory().Path 740Dim tempDir As String = Temp.CreateDirectory().Path 2421Dim exitCode As Integer = New MockVisualBasicCompiler(Nothing, folder.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/recurse:.", "b.vb", "/out:abc.dll"}).Run(outWriter, Nothing) 2426exitCode = New MockVisualBasicCompiler(Nothing, folder.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/recurse:. ", "b.vb", "/out:abc.dll"}).Run(outWriter, Nothing) 2431exitCode = New MockVisualBasicCompiler(Nothing, folder.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/recurse: . ", "/out:abc.dll"}).Run(outWriter, Nothing) 2436exitCode = New MockVisualBasicCompiler(Nothing, folder.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/recurse:./.", "/out:abc.dll"}).Run(outWriter, Nothing) 2443args = DefaultParse({"/recurse:*.cp*", "/recurse:b\*.v*", "/out:a.dll"}, folder.Path) 2446AssertEx.Equal({folder.Path + "\c.cpp", folder.Path + "\b\B_e.vb"}, resolvedSourceFiles) 2448args = DefaultParse({"/recurse:.\\\\\\*.vb", "/out:a.dll"}, folder.Path) 2453args = DefaultParse({"/recurse:.////*.vb", "/out:a.dll"}, folder.Path) 2471Dim exitCode = New MockVisualBasicCompiler(Nothing, folder.Path, {"/nologo", "/preferreduilang:en", "/t:exe", "/out:abc.exe"}).Run(outWriter, Nothing) 2604Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/a:missing.dll", "a.vb"}) 2621Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/a:" + GetType(Object).Assembly.Location, "a.vb"}) 2639Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb"}) 2672Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", "/ruleset:" + ruleSetFile.Path}) 2702Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 2716vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 2752Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 2767vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 2806Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", "/ruleset:" + ruleSetFile.Path}) 3193Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/debug:embedded", "/sourcelink:sl.json", "a.vb"}) 3197Dim peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe")) 3226Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/debug:portable", "/sourcelink:sl.json", "a.vb"}) 3230Dim pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb")) 3381Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", debugSwitch, embedSwitch, "embed.vb", "embed2.vb"}) 3400Using peReader As New PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe"))) 3407MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")))) 3431symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))) 3575Dim sdkPath = sdkDir.Path 3577Dim parser = VisualBasicCommandLineParser.Default.Parse({$"-sdkPath:{sdkPath}"}, parentDir.Path, Nothing) 3585Dim parser = VisualBasicCommandLineParser.Default.Parse({"file.vb", "-sdkPath", $"-out:{parentDir.Path}"}, parentDir.Path, Nothing) 3596Dim parser = VisualBasicCommandLineParser.Default.Parse({"file.vb", $"-out:{parentDir.Path}", "-sdkPath:path/to/sdk", "/noSdkPath"}, parentDir.Path, Nothing) 3605Dim parser = VisualBasicCommandLineParser.Default.Parse({"file.vb", $"-out:{parentDir.Path}", "/noSdkPath", $"-sdkPath:{sdkDir.Path}"}, parentDir.Path, Nothing) 3606AssertEx.Equal(ImmutableArray.Create(sdkDir.Path), parser.ReferencePaths) 3622Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/nosdkpath", "/t:library", "a.vb"}) 3647Dim pdbPath = Path.Combine(dir.Path, "a.pdb") 3653Dim vbc = New MockVisualBasicCompiler(dir.Path, args) 3657Dim exePath = Path.Combine(dir.Path, "a.exe") 3668Dim pePdbPath = Path.Combine(dir.Path, "a.pdb") 3675assertPdbEmit(dir, pePdbPath, {$"/pathmap:{dir.Path}=q:\"}) 3681assertPdbEmit(dir, pePdbPath, {$"/pathmap:{dir.Path}=q:\", "/deterministic"}) 3688assertPdbEmit(subDir, pePdbPath, {$"/pathmap:{dir.Path}=q:\"}) 3693Dim pePdbPath = Path.Combine(dir.Path, "a.pdb") 3699Dim pdbPath = Path.Combine(dir.Path, "a.pdb") 3700assertPdbEmit(dir, "/a.pdb", {$"/pathmap:{dir.Path}=/"}) 3705Dim pdbPath = Path.Combine(dir.Path, "a.pdb") 3706assertPdbEmit(dir, "/goo/a.pdb", {$"/pathmap:{dir.Path}=/goo,{dir.Path}{PathUtilities.DirectorySeparatorChar}=/bar"}) 5225Dim output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /sdkpath:l:\x /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5231output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /r:mscorlib.dll /vbruntime- /sdkpath:c:folder /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5237output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /sdkpath:" & dir.Path & " /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5241</text>, output.Replace(dir.Path, "{SDKPATH}")) 5247output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /sdkpath:" & dir.Path & " /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5251</text>, output.Replace(dir.Path, "{SDKPATH}")) 5256output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /sdkpath:" & dir.Path & " /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5260</text>, output.Replace(dir.Path, "{SDKPATH}")) 5267output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /nostdlib /sdkpath:" & dir.Path & " /t:library /vbruntime* /r:" & Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.dll") & " " & src.ToString(), startFolder:=dir.Path) 5268AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) ' SUCCESSFUL BUILD with 'mscorlib.dll' and embedded VbCore 5273output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /nostdlib /sdkpath:" & dir.Path & " /t:library /vbruntime* /r:" & Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.dll") & " " & src.ToString(), startFolder:=dir.Path) 5274AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5298Dim sdkMultiPath = subFolder1.Path & "," & subFolder2.Path 5305output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, cmdNoStdLibNoRuntime, startFolder:=dir.Path, expectedRetCode:=1) 5306AssertOutput(<text>vbc : error BC2017: could not find library 'mscorlib.dll'</text>, output.Replace(dir.Path, "{SDKPATH}")) 5313output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, cmdNoStdLibNoRuntime, startFolder:=dir.Path) 5314AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5316output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, cmd, startFolder:=dir.Path, expectedRetCode:=1) 5321</text>, output.Replace(dir.Path, "{SDKPATH}")) 5338Dim output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /t:library " & src.ToString(), startFolder:=dir.Path, expectedRetCode:=1) 5341output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /nostdlib /define:_MYTYPE=\""Empty\"" /t:library " & src.ToString(), startFolder:=dir.Path) 5344output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /nostdlib /sdkpath:x:\ /vbruntime- /define:_MYTYPE=\""Empty\"" /t:library " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 5769Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, commandLineArguments.Concat({inputName1, inputName2}).ToArray()) 5776Assert.Equal(1, Directory.EnumerateFiles(dir.Path, "*" & PathUtilities.GetExtension(expectedOutputName)).Count()) 5777Assert.Equal(1, Directory.EnumerateFiles(dir.Path, expectedOutputName).Count()) 5909Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, commandLineArguments.Concat({fileName}).ToArray()) 5961Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6014Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en", "-imports:System"}) 6051Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6101Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6145Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6193Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6239Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6281Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en"}) 6316Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/target:exe", "/preferreduilang:en", "/out:sub\a.exe"}) 6320Assert.Contains("error BC2012: can't open '" + dir.Path + "\sub\a.exe' for writing", output.ToString(), StringComparison.Ordinal) 6348Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en", "/target:exe", "/out:sub\"}) 6382Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en", "/target:exe", "/out:sub\ "}) 6416Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en", "/target:exe", "/out:aaa:\a.exe"}) 6448Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, "/preferreduilang:en", "/target:exe", "/out: "}) 6471Dim output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /t:library " & file.ToString(), startFolder:=dir.Path) 6474output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /preferreduilang:en /t:library /codepage:20127 " & file.ToString(), expectedRetCode:=1, startFolder:=dir.Path) ' 20127: US-ASCII 6835vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 6843vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 6853Dim library As IntPtr = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 2) 7535Dim output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /t:library /langversion:9 /preferreduilang:en " & src.ToString(), expectedRetCode:=1, startFolder:=dir.Path) 7618Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "a.vb"}) 7636" & Path.GetFullPath(Path.Combine(dir.Path, "..\b.vb")) & "(40) : error BC30451: 'Goo' is not declared. It may be inaccessible due to its protection level. 7639" & Path.GetFullPath(Path.Combine(dir.Path, "..\b.vb")) & "(50) : error BC30451: 'Goo' is not declared. It may be inaccessible due to its protection level. 7805args = DefaultParse({"/additionalfile:web*.config", "a.vb"}, baseDir.Path) 7808Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles(0).Path) 7809Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles(1).Path) 7810Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles(2).Path) 7951Dim vbc = New MockVisualBasicCompiler(Nothing, sourceDir.Path, args, analyzers, generators) 8718Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "A.vb"}, dir.Path) 8738Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "A.vb"}, dir.Path) 8759Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "A.vb"}, dir.Path) 8780Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+:Test001", "A.vb"}, dir.Path) 8801Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "/WarnAsError-", "A.vb"}, dir.Path) 8822Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "/WarnAsError-:Test001", "A.vb"}, dir.Path) 8843Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+:Test002", "/WarnAsError-:Test002", "A.vb"}, dir.Path) 8865Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/NoWarn", "/WarnAsError+", "A.vb"}, dir.Path) 8886Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/WarnAsError+", "/NoWarn", "/WarnAsError-", "A.vb"}, dir.Path) 8909Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/NoWarn", "A.vb"}, dir.Path) 8932Dim arguments = DefaultParse({"/ruleset:Rules.RuleSet", "/NoWarn:Test001", "/WarnAsError+", "/WarnAsError-:Test001", "A.vb"}, dir.Path) 9156Dim vbc As New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/target:exe", fileName}) 9361Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 9367Dim exe = Path.Combine(dir.Path, "a.exe") 9376Dim doc = Path.Combine(dir.Path, "doc.xml") 9399Dim output = ProcessUtilities.RunAndGetOutput(exe, startFolder:=dir.Path) 9402Dim refDll = Path.Combine(refDir.Path, "a.dll") 9414CleanupAllGeneratedFiles(dir.Path) 9415CleanupAllGeneratedFiles(refDir.Path) 9432Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 9438Dim vb = Path.Combine(dir.Path, "a.vb") 9440Dim dll = Path.Combine(dir.Path, "a.dll") 9443Dim refDll = Path.Combine(dir.Path, Path.Combine("ref", "a.dll")) 9454CleanupAllGeneratedFiles(dir.Path) 9479Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, 9485Dim refDll = Path.Combine(dir.Path, "a.dll") 9496Dim pdb = Path.Combine(dir.Path, "a.pdb") 9499Dim doc = Path.Combine(dir.Path, "doc.xml") 9529CleanupAllGeneratedFiles(dir.Path) 9572Assert.Equal(0, New MockVisualBasicCompiler(Nothing, dir.Path, {fileName, targetArg, outArg}).Run(output, Nothing)) 9573Assert.True(File.Exists(Path.Combine(dir.Path, expectedFile)), "Expected to find: " & expectedFile) 9574Assert.False(File.Exists(Path.Combine(dir.Path, unexpectedFile)), "Didn't expect to find: " & unexpectedFile) 9581Dim srcPath = MakeTrivialExe(Temp.CreateDirectory().Path) 9600Dim srcPath = MakeTrivialExe(Temp.CreateDirectory().Path) 9620Dim srcPath = MakeTrivialExe(Temp.CreateDirectory().Path) 9641Dim srcPath = MakeTrivialExe(Temp.CreateDirectory().Path) 9686Dim result = ProcessUtilities.Run(vbcPath, arguments:="/nologo /t:library unknown.vb", workingDirectory:=dir.Path) 9694result = ProcessUtilities.Run(vbcPath, arguments:="/nologo /t:library unknown.vb", workingDirectory:=dir.Path) 9706Dim src = MakeTrivialExe(directory:=dir.Path) 9710Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, args) 9714Dim exePath = Path.Combine(dir.Path, "a.exe") 9731Dim vbc = New MockVisualBasicCompiler(Nothing, New BuildPaths("", workingDir.Path, Nothing, tempDir.Path), 10017Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll") 10020Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb") 10023Dim docPath As String = Path.Combine(dir.Path, docName) 10069Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll") 10072Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb") 10075Dim docPath As String = Path.Combine(dir.Path, docName) 10126Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll") 10129Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb") 10132Dim docPath As String = Path.Combine(dir.Path, docName) 10163Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll") 10190Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, args, analyzer) 10227Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, args, analyzer) 10435CleanupAllGeneratedFiles(srcDirectory.Path) 10574Dim generatorPrefix = GeneratorDriver.GetFilePathPrefixForGenerator(baseDirectory:=generatedDir.Path, generator) 10576{{generatedDir.Path, New Dictionary(Of String, String)()}} 10580Directory.Delete(dir.Path, True) 10590Dim generatedDirPath = Path.Combine(dir.Path, "noexist") 10602Directory.Delete(dir.Path, True) 10619VerifyOutput(dir, src, includeCurrentAssemblyAsAnalyzerReference:=False, additionalFlags:={"/generatedfilesout:" + generatedDir.Path}, generators:={generator}) 10621Dim generatorPrefix = GeneratorDriver.GetFilePathPrefixForGenerator(baseDirectory:=generatedDir.Path, generator) 10623{{Path.Combine(generatedDir.Path, generatorPrefix), New Dictionary(Of String, String)() From 10629Directory.Delete(dir.Path, True) 10645Directory.Delete(dir.Path, True) 10720Directory.Delete(dir.Path, True) 10755Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 10798Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 10843Dim cmd = New MockVisualBasicCompiler(Nothing, dir.Path, { 10876Dim generatorPath = Path.Combine(directory.Path, "generator.dll")
SarifErrorLoggerTests.vb (5)
49Dim errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt") 84Dim errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt") 125Dim errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt") 163Dim errorLogFile = Path.Combine(outputDir.Path, "ErrorLog.txt") 164Dim outputFilePath = Path.Combine(outputDir.Path, "test.dll")
TouchedFileLoggingTests.vb (3)
36Dim touchedBase = Path.Combine(touchedDir.Path, "touched") 67Dim touchedBase = Path.Combine(touchedDir.Path, "touched") 109Dim touchedBase = Path.Combine(touchedDir.Path, "touched")
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\EmitTestStrongNameProvider.vb (1)
23Dim testFileSystem = New TestStrongNameFileSystem(Temp.CreateDirectory().Path) With {
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
NetCoreTests.cs (4)
36["NUGET_PACKAGES"] = _nugetCacheDir.Path 43workingDirectory: SolutionDirectory.Path, 51var arguments = $@"msbuild ""{solutionOrProjectFileName}"" /t:restore /bl:{Path.Combine(SolutionDirectory.Path, "restore.binlog")}"; 57var arguments = $@"msbuild ""{solutionOrProjectFileName}"" /bl:{Path.Combine(SolutionDirectory.Path, "build.binlog")}";
NewlyCreatedProjectsFromDotNetNew.cs (1)
154var projectDirectory = SolutionDirectory.Path;
WorkspaceTestBase.cs (1)
34return Path.Combine(this.SolutionDirectory.Path, relativeFileName);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
28var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, tempDirectory.Path, ws);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
283var analyzerConfigDocFilePath = PathUtilities.CombineAbsoluteAndRelativePaths(Temp.CreateDirectory().Path, ".editorconfig");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (10)
PersistentStorage\AbstractPersistentStorageTests.cs (4)
875solution = solution.AddDocument(id, "file.cs", "class C { void M() }", filePath: Path.Combine(_persistentFolder.Path, "file.cs")); 895solution = solution.AddDocument(id, "file.cs", "class C { void M() }", filePath: Path.Combine(_persistentFolder.Path, "file.cs")); 1011var configuration = new MockPersistentStorageConfiguration(solution.Id, persistentFolder.Path, throwOnFailure); 1029var configuration = new MockPersistentStorageConfiguration(solutionKey.Id, _persistentFolder.Path, throwOnFailure: true);
ProjectSystemShim\TempPECompilerServiceTests.cs (2)
31pszOutputFileName: Path.Combine(directory.Path, "Output.dll"), 37optionValues: [Path.Combine(directory.Path, "MissingReference.dll")]);
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (4)
67Directory.Delete(dir.Path, recursive: true); 74var outputs = new CompilationOutputFilesWithImplicitPdbPath(Path.Combine(dir.Path, "nonexistent.dll")); 89var debugDirPdbPath = Path.Combine(dir.Path, "nonexistent.pdb"); 106Directory.Delete(dir.Path, recursive: true);
VBCSCompiler.UnitTests (45)
AnalyzerConsistencyCheckerTests.cs (12)
87var assemblyLoader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(directory.CreateDirectory("shadow").Path); 90var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, assemblyLoader, Logger); 98var assemblyLoader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(directory.CreateDirectory("shadow").Path); 113var assemblyLoader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(directory.CreateDirectory("shadow").Path); 123var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, assemblyLoader, Logger); 138var assemblyLoader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(directory.CreateDirectory("shadow").Path); 144directory.Path, 154directory.Path, 187var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, assemblyLoader, Logger); 210var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, assemblyLoader, Logger); 228var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, new ThrowingLoader(), Logger); 242var result = AnalyzerConsistencyChecker.Check(directory.Path, analyzerReferences, new DefaultAnalyzerAssemblyLoader(), Logger);
BuildClientTests.cs (2)
40workingDir: Temp.CreateDirectory().Path, 41tempDir: Temp.CreateDirectory().Path);
BuildServerConnectionTests.cs (4)
40var workingDirectory = TempRoot.CreateDirectory().Path; 69var workingDirectory = TempRoot.CreateDirectory().Path; 99ProtocolUtil.CreateEmptyCSharp(TempRoot.CreateDirectory().Path), 120var workingDirectory = TempRoot.CreateDirectory().Path;
CompilerServerApiTest.cs (1)
115var request = BuildRequest.Create(RequestLanguage.CSharpCompile, workingDirectory: temp.CreateDirectory().Path, tempDirectory: null, compilerHash: BuildProtocolConstants.GetCommitHash(), libDirectory: null, args: Array.Empty<string>());
CompilerServerTests.cs (20)
201workingDir: currentDirectory.Path, 231finalFlags = $"{flags} /shared:{serverData.PipeName} /pathmap:{tempDir.Path}=/ /out:{outFile} {srcFile}"; 257return new DisposableFile(Path.Combine(directory.Path, resultFileName)); 290var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length)); 292new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) }, 559Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe"))); 589Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe"))); 606Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe"))); 624Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe"))); 649Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe"))); 667Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe"))); 696Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hellovb.exe"))); 725Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe"))); 1063$"src1.cs /shared:{serverData.PipeName} /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"), 1081additionalEnvironmentVars: new Dictionary<string, string>() { { "LIB", libDirectory.Path } }); 1114$"src1.vb /shared:{serverData.PipeName} /vbruntime* /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"), 1133additionalEnvironmentVars: new Dictionary<string, string>() { { "LIB", libDirectory.Path } }); 1397var tmp = Path.Combine(_tempDirectory.Path, "Temp"); 1431var tmp = Path.Combine(_tempDirectory.Path, "Temp"); 1463var workingDirectory = dir.Path;
TouchedFileLoggingTests.cs (4)
49var loader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(Temp.CreateDirectory().Path); 60var touchedBase = Path.Combine(touchedDir.Path, "touched"); 100var loader = DefaultAnalyzerAssemblyLoader.CreateNonLockingLoader(Temp.CreateDirectory().Path); 111var touchedBase = Path.Combine(touchedDir.Path, "touched");
VBCSCompilerServerTests.cs (2)
305var workingDirectory = TempRoot.CreateDirectory().Path; 346var workingDirectory = TempRoot.CreateDirectory().Path;