37 instantiations of TempRoot
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.UnitTests (15)
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Roslyn.VisualStudio.Next.UnitTests (6)
VBCSCompiler.UnitTests (3)
209 references to TempRoot
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (6)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (5)
45AddDocument("test.cs", SourceText.From(source, Encoding.UTF8), filePath: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
464AddDocument("test.cs", root, filePath: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
665var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
711var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
738var filePath = Path.Combine(TempRoot.Root, "src.cs");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (6)
Microsoft.CodeAnalysis.Features.UnitTests (25)
EditAndContinue\CompileTimeSolutionProviderTests.cs (6)
30var projectFilePath = Path.Combine(TempRoot.Root, "a.csproj");
31var additionalFilePath = Path.Combine(TempRoot.Root, "a", $"X.{kind}");
32var designTimeFilePath = Path.Combine(TempRoot.Root, "a", $"X.{kind}.g.cs");
35var sourceGeneratedPathPrefix = Path.Combine(TempRoot.Root, typeof(TestSourceGenerator).Assembly.GetName().Name!, typeof(TestSourceGenerator).FullName);
44assemblyPath: Path.Combine(TempRoot.Root, "proj"),
114assemblyPath: Path.Combine(TempRoot.Root, "proj"),
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (13)
1534var pathA = Path.Combine(TempRoot.Root, "A.cs");
1535var pathB = Path.Combine(TempRoot.Root, "B.cs");
1536var pathC = Path.Combine(TempRoot.Root, "C.cs");
1537var pathD = Path.Combine(TempRoot.Root, "D.cs");
1538var pathX = Path.Combine(TempRoot.Root, "X");
1539var pathY = Path.Combine(TempRoot.Root, "Y");
1540var pathCommon = Path.Combine(TempRoot.Root, "Common.cs");
1609var pathX = Path.Combine(TempRoot.Root, "X.cs");
1610var pathA = Path.Combine(TempRoot.Root, "A.cs");
1776var pathA = Path.Combine(TempRoot.Root, "A.txt");
2860TempRoot.Root,
3189AddDocument("DocB", source1, filePath: Path.Combine(TempRoot.Root, "DocB.cs")).Project;
3528var filePath = withPath ? Path.Combine(TempRoot.Root, "test.cs") : null;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (4)
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.Test.Utilities (15)
Microsoft.CodeAnalysis.UnitTests (20)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (9)
CommandLineTests.vb (7)
44Private ReadOnly _baseDirectory As String = TempRoot.Root
2882Diagnostic(ERRID.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah"), "File not found."))
2883Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah"), actual:=parsedArgs.RuleSetPath)
2887Diagnostic(ERRID.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah;blah.ruleset"), "File not found."))
2888Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual:=parsedArgs.RuleSetPath)
3541Dim parsedArgs = VisualBasicCommandLineParser.Default.Parse({pathmapArg, "a.vb"}, TempRoot.Root, RuntimeEnvironment.GetRuntimeDirectory(), Nothing)
3550Dim parsedArgs = VisualBasicCommandLineParser.Default.Parse(args, TempRoot.Root, RuntimeEnvironment.GetRuntimeDirectory(), Nothing)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
SolutionTests\SolutionTests.cs (15)
1163var generatedOutputDir = Path.Combine(TempRoot.Root, "obj");
1164var assemblyPath = Path.Combine(TempRoot.Root, "bin", "assemblyName.dll");
1483var objDir = Path.Combine(TempRoot.Root, "obj");
1484var binDir = Path.Combine(TempRoot.Root, "bin");
1485var otherDir = Path.Combine(TempRoot.Root, "other");
1542var info = new CompilationOutputInfo("\0<>a/b/*.dll", TempRoot.Root + "<>\0");
2392var filePath = Path.Combine(TempRoot.Root, "x.cs");
2423var filePath = Path.Combine(TempRoot.Root, "x.cs");
2451var filePath = Path.Combine(TempRoot.Root, "x.cs");
2480var filePath = Path.Combine(TempRoot.Root, "x.cs");
4504using var root = new TempRoot();
5498projectPath = string.IsNullOrEmpty(projectPath) ? projectPath : Path.Combine(TempRoot.Root, projectPath);
5499configPath = Path.Combine(TempRoot.Root, configPath);
5500sourcePath = string.IsNullOrEmpty(sourcePath) ? sourcePath : Path.Combine(TempRoot.Root, sourcePath);
5732.WithCompilationOutputInfo(new CompilationOutputInfo(assemblyPath: Path.Combine(TempRoot.Root, "assembly.dll"), generatedFilesOutputDirectory: null));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (3)
Microsoft.VisualStudio.LanguageServices.UnitTests (58)
Diagnostics\VisualStudioDiagnosticAnalyzerProviderTests.vb (6)
25Path.Combine(TempRoot.Root, "ResolvedRootFolder\test\test.dll"),
26Path.Combine(TempRoot.Root, "ResolvedShellFolder\test\test.dll"),
27Path.Combine(TempRoot.Root, "InstallPath\test\test.dll")
42Path.Combine(TempRoot.Root, "InstallPath\installPath1"),
43Path.Combine(TempRoot.Root, "InstallPath\installPath2"),
44Path.Combine(TempRoot.Root, "InstallPath\installPath3")
ProjectSystemShim\VisualStudioProjectTests\AnalyzerReferenceTests.vb (50)
108Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
109Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
110Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll")
114Path.Combine(TempRoot.Root, "File.dll")
123project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
128project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
133project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
134project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
135project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
136project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
140Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
141Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
142Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll"),
143Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
144Path.Combine(TempRoot.Root, "Dir", "File.dll")
150Sub() project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll")))
154Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
155Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
156Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll"),
157Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
158Path.Combine(TempRoot.Root, "Dir", "File.dll")
162project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
163project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
164project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
168Path.Combine(TempRoot.Root, "Dir", "File.dll")
174Sub() project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll")))
178Path.Combine(TempRoot.Root, "Dir", "File.dll")
190Path.Combine(TempRoot.Root, "File.dll")
199Dim path1 = Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.NET.Sdk.Razor.SourceGenerators.dll")
200Dim path2 = Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll")
218project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.dll"))
219project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
220project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"))
221project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll"))
230project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
235Path.Combine(TempRoot.Root, "Dir", "File.dll")
239project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.dll"))
240project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
241project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"))
242project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll"))
259project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.dll"))
260project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
261project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll"))
262project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll"))
271project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
276Path.Combine(TempRoot.Root, "Dir", "File.dll")
279project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.dll"))
280project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
281project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll"))
282project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll"))
Roslyn.VisualStudio.Next.UnitTests (15)
Remote\SnapshotSerializationTests.cs (12)
59.AddAnalyzerReference(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path1"), new TestAnalyzerAssemblyLoader()))
63.WithAnalyzerReferences([new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path2"), new TestAnalyzerAssemblyLoader())])
392var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
406var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
417using var tempRoot = new TempRoot();
438using var tempRoot = new TempRoot();
459using var tempRoot = new TempRoot();
478using var temp = new TempRoot();
504var analyzer = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
538var analyzer = serializer.CreateChecksum(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing"), new MissingAnalyzerLoader()), CancellationToken.None);
560using var tempRoot = new TempRoot();
693private static AnalyzerFileReference CreateShadowCopiedAnalyzerReference(TempRoot tempRoot)
VBCSCompiler.UnitTests (4)