1 write to Path
Microsoft.NET.TestFramework (1)
TestDirectory.cs (1)
15Path = path;
1951 references to Path
ArgumentForwarding.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
containerize.UnitTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
dotnet.Tests (1144)
CommandFactoryTests\GivenAProjectDependencyCommandResolver.cs (12)
31NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 34.WithWorkingDirectory(testAsset.Path) 44ProjectDirectory = testAsset.Path, 66NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 69.WithWorkingDirectory(testAsset.Path) 79ProjectDirectory = testAsset.Path, 97NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 110ProjectDirectory = testAsset.Path, 126NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 135var outputDir = Path.Combine(testAsset.Path, "out"); 141ProjectDirectory = testAsset.Path, 147.WithWorkingDirectory(testAsset.Path)
CommandFactoryTests\GivenAProjectToolsCommandResolver.cs (19)
72ProjectDirectory = projectDirectory.Path 88NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 96ProjectDirectory = testInstance.Path 112NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 120ProjectDirectory = testInstance.Path 142NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 150ProjectDirectory = testInstance.Path 167NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 175ProjectDirectory = testInstance.Path 194NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 202ProjectDirectory = testInstance.Path 222NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 230ProjectDirectory = testInstance.Path 268NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 305NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 313ProjectDirectory = testInstance.Path 331var testProjectDirectory = testInstance.Path; 356var testProjectDirectory = testInstance.Path; 400var nugetConfig = Path.Combine(testInstance.Path, "NuGet.Config");
CommandTests\Build\GivenDotnetBuildBuildsCsproj.cs (17)
23var buildCommand = new DotnetBuildCommand(Log, testInstance.Path); 31var outputPathCalculator = OutputPathCalculator.FromProject(testInstance.Path); 49new DotnetBuildCommand(Log, testInstance.Path) 64new DotnetBuildCommand(Log, testInstance.Path) 77string projectDirectory = Path.Combine(testInstance.Path, "MultiTFMTestApp"); 92.WithWorkingDirectory(testInstance.Path) 105string responseFilePath = Path.Combine(testInstance.Path, "Directory.Build.rsp"); 110.WithWorkingDirectory(testInstance.Path) 121var rootPath = testInstance.Path; 164.WithWorkingDirectory(testInstance.Path) 178.WithWorkingDirectory(testInstance.Path) 198.WithWorkingDirectory(testInstance.Path) 219.WithWorkingDirectory(Path.Combine(testInstance.Path, testProject.Name ?? string.Empty)) 238.WithWorkingDirectory(testInstance.Path) 255.WithWorkingDirectory(testInstance.Path) 310.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name ?? string.Empty)) 344NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages);
CommandTests\Build\GivenDotnetBuildBuildsDcproj.cs (1)
25.WithWorkingDirectory(testInstance.Path)
CommandTests\BuildServer\Shutdown\BuildServerShutdownCommandTests.cs (1)
165var pidDirectory = _testAssetsManager.CreateTestDirectory(identifier: "pidDirectory").Path;
CommandTests\Clean\GivenDotnetCleanCleansBuildArtifacts.cs (3)
19new DotnetBuildCommand(Log, testInstance.Path) 24var outputFolder = new DirectoryInfo(OutputPathCalculator.FromProject(testInstance.Path).GetOutputDirectory(configuration: configuration, runtimeIdentifier: $"{ToolsetInfo.LatestWinRuntimeIdentifier}-x64")); 28new DotnetCommand(Log, "clean", testInstance.Path)
CommandTests\Hidden\Complete\CompleteCommandTests.cs (4)
347Directory.SetCurrentDirectory(testAsset.Path); 369Directory.SetCurrentDirectory(testAsset.Path); 392Directory.SetCurrentDirectory(testAsset.Path); 418Directory.SetCurrentDirectory(testAsset.Path);
CommandTests\MSBuild\GivenDotnetMSBuildBuildsProjects.cs (4)
24var testProjectDirectory = testInstance.Path; 61.WithWorkingDirectory(projectDirectory.Path) 84var root = testInstance.Path; 103.WithWorkingDirectory(projectDirectory.Path)
CommandTests\MSBuild\GivenDotnetOsArchOptions.cs (2)
122.WithWorkingDirectory(testInstance.Path) 139.WithWorkingDirectory(testInstance.Path)
CommandTests\MSBuild\GivenDotnetRunInvocation.cs (1)
35var newWorkingDir = tam.CopyTestAsset("HelloWorld", identifier: $"{nameof(MsbuildInvocationIsCorrect)}_{args.GetHashCode()}_{expectedArgs.GetHashCode()}").WithSource().Path;
CommandTests\NuGet\GivenANuGetCommand.cs (3)
104var rootPath = _testAssetsManager.CreateTestDirectory().Path; 122var projectDirectory = testAsset.Path; 147var projectDirectory = testAsset.Path;
CommandTests\Pack\PackTests.cs (39)
23.WithWorkingDirectory(testInstance.Path); 29var outputDir = new DirectoryInfo(Path.Combine(testInstance.Path, "bin", "Test")); 44var outputDir = new DirectoryInfo(Path.Combine(testInstance.Path, "bin2")); 47.WithWorkingDirectory(testInstance.Path) 65.WithWorkingDirectory(testInstance.Path) 69var output = new FileInfo(Path.Combine(testInstance.Path, 78var outputPackage = new FileInfo(Path.Combine(testInstance.Path, 92.WithWorkingDirectory(testInstance.Path) 96var outputPackage = new FileInfo(Path.Combine(testInstance.Path, 115.WithWorkingDirectory(testInstance.Path) 120var outputPackage = new FileInfo(Path.Combine(testInstance.Path, 130var symbolsPackage = new FileInfo(Path.Combine(testInstance.Path, 151.WithWorkingDirectory(testInstance.Path) 163.WithWorkingDirectory(testInstance.Path) 175.WithWorkingDirectory(testInstance.Path) 193.WithWorkingDirectory(testInstance.Path) 206.WithWorkingDirectory(testInstance.Path); 212var outputDir = new DirectoryInfo(Path.Combine(testInstance.Path, "bin", "Debug")); 235var rootPath = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, "TestProject"); 270.WithWorkingDirectory(testInstance.Path) 288.WithWorkingDirectory(testInstance.Path) 300string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec"); 302.WithWorkingDirectory(testInstance.Path) 308var outputDir = new DirectoryInfo(testInstance.Path); 312var nupkgPath = Path.Combine(testInstance.Path, "PackNoCsproj.1.2.3.nupkg"); 329string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec"); 331.WithWorkingDirectory(testInstance.Path) 344string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec"); 347.WithWorkingDirectory(testInstance.Path) 355var nupkgPath = Path.Combine(testInstance.Path, "CustomID.1.0.0.nupkg"); 375string nuspecPath = Path.Combine(testInstance.Path, "TestingPackWithConfig.nuspec"); 377var configDir = Path.Combine(testInstance.Path, "bin", configuration); 382.WithWorkingDirectory(testInstance.Path) 386var outputPackage = new FileInfo(Path.Combine(testInstance.Path, "TestPackWithConfig.1.0.0.nupkg")); 402string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec"); 403string outputDirPath = Path.Combine(testInstance.Path, "output"); 406.WithWorkingDirectory(testInstance.Path) 426string nuspecPath = Path.Combine(testInstance.Path, "NonExistent.nuspec"); 429.WithWorkingDirectory(testInstance.Path)
CommandTests\Package\Add\GivenDotnetPackageAdd.cs (38)
22.Path; 118.Path; 135.Path; 157.Path; 184.Path; 205.Path; 227.Path; 246.Path; 261.Path; 277.Path; 326var file = Path.Join(testInstance.Path, "Program.cs"); 332.WithWorkingDirectory(testInstance.Path) 351var file = Path.Join(testInstance.Path, "Program.cs"); 358.WithWorkingDirectory(testInstance.Path) 377var file = Path.Join(testInstance.Path, "Program.cs"); 385.WithWorkingDirectory(testInstance.Path) 414var file = Path.Join(testInstance.Path, "Program.cs"); 422.WithWorkingDirectory(testInstance.Path) 439var file = Path.Join(testInstance.Path, "Program.cs"); 445.WithWorkingDirectory(testInstance.Path) 462var file = Path.Join(testInstance.Path, "Program.cs"); 469.WithWorkingDirectory(testInstance.Path) 483var file = Path.Join(testInstance.Path, "Program.cs"); 490.WithWorkingDirectory(testInstance.Path) 503var file = Path.Join(testInstance.Path, "Program.cs"); 509.WithWorkingDirectory(testInstance.Path) 526var file = Path.Join(testInstance.Path, "Program.cs"); 532var directoryPackagesProps = Path.Join(testInstance.Path, "Directory.Packages.props"); 542.WithWorkingDirectory(testInstance.Path) 570var file = Path.Join(testInstance.Path, "Program.cs"); 586var directoryPackagesProps = Path.Join(testInstance.Path, "Directory.Packages.props"); 599.WithWorkingDirectory(testInstance.Path) 633var file = Path.Join(testInstance.Path, "Program.cs"); 640var directoryPackagesProps = Path.Join(testInstance.Path, "Directory.Packages.props"); 650.WithWorkingDirectory(testInstance.Path) 677var file = Path.Join(testInstance.Path, "Program.cs"); 684var directoryPackagesProps = Path.Join(testInstance.Path, "Directory.Packages.props"); 698.WithWorkingDirectory(testInstance.Path)
CommandTests\Package\List\GivenDotnetListPackage.cs (14)
23var projectDirectory = testAsset.Path; 48var projectDirectory = testAsset.Path; 80var projectDirectory = testAsset.Path; 112var projectDirectory = testAsset.Path; 137.Path; 154.Path; 204var projectDirectory = Path.Combine(testAsset.Path, testProject.Name); 246var projectDirectory = testAsset.Path; 285var projectDirectory = testAsset.Path; 306var projectDirectory = testAsset.Path; 371var projectDirectory = testAsset.Path; 393var projectDirectory = testAsset.Path; 416var projectDirectory = testAsset.Path; 439var projectDirectory = testAsset.Path;
CommandTests\Package\Remove\GivenDotnetPackageRemove.cs (4)
14.WithSource().Path; 36.WithSource().Path; 59.Path; 74.Path;
CommandTests\Package\Remove\GivenDotnetRemovePackage.cs (7)
71.WithSource().Path; 93var file = Path.Join(testInstance.Path, "Program.cs"); 101.WithWorkingDirectory(testInstance.Path) 115var file = Path.Join(testInstance.Path, "Program.cs"); 126.WithWorkingDirectory(testInstance.Path) 143var file = Path.Join(testInstance.Path, "Program.cs"); 149.WithWorkingDirectory(testInstance.Path)
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (130)
26var dotnetProjectConvert = Path.Join(testInstance.Path, "dotnetProjectConvert"); 49var dotnetNewConsole = Path.Join(testInstance.Path, "DotnetNewConsole"); 86var libraryDirFullPath = Path.Join(testInstance.Path, libraryDir); 105var fileDirFullPath = Path.Join(testInstance.Path, fileDir); 120var outputDirFullPath = Path.Join(testInstance.Path, outputDir); 143var libraryDirFullPath = Path.Join(testInstance.Path, "Lib"); 162var fileDirFullPath = Path.Join(testInstance.Path, "File"); 177var outputDirFullPath = Path.Join(testInstance.Path, "File/Project"); 199var directoryPath = Path.Join(testInstance.Path, "MyApp"); 201File.WriteAllText(Path.Join(testInstance.Path, "MyApp.cs"), "Console.WriteLine();"); 204.WithWorkingDirectory(testInstance.Path) 209new DirectoryInfo(testInstance.Path) 218Directory.CreateDirectory(Path.Join(testInstance.Path, "MyApp")); 219File.WriteAllText(Path.Join(testInstance.Path, "MyApp.cs"), "Console.WriteLine();"); 222.WithWorkingDirectory(testInstance.Path) 226new DirectoryInfo(testInstance.Path) 230new DirectoryInfo(Path.Join(testInstance.Path, "MyApp")) 233new DirectoryInfo(Path.Join(testInstance.Path, "MyApp1")) 242var directoryPath = Path.Join(testInstance.Path, "SomeOutput"); 244File.WriteAllText(Path.Join(testInstance.Path, "MyApp.cs"), "Console.WriteLine();"); 247.WithWorkingDirectory(testInstance.Path) 252new DirectoryInfo(testInstance.Path) 261File.WriteAllText(Path.Join(testInstance.Path, "Program1.cs"), "Console.WriteLine(1);"); 262File.WriteAllText(Path.Join(testInstance.Path, "Program2.cs"), "Console.WriteLine(2);"); 265.WithWorkingDirectory(testInstance.Path) 269new DirectoryInfo(testInstance.Path) 273new DirectoryInfo(Path.Join(testInstance.Path, "Program1")) 284.WithWorkingDirectory(testInstance.Path) 289new DirectoryInfo(testInstance.Path) 299.WithWorkingDirectory(testInstance.Path) 302.And.HaveStdErrContaining(string.Format(CliCommandStrings.InvalidFilePath, Path.Join(testInstance.Path, "NotHere.cs"))); 304new DirectoryInfo(testInstance.Path) 312var filePath = Path.Join(testInstance.Path, "Program.vb"); 316.WithWorkingDirectory(testInstance.Path) 321new DirectoryInfo(testInstance.Path) 330File.WriteAllText(Path.Join(testInstance.Path, "Program.CS"), "Console.WriteLine();"); 333.WithWorkingDirectory(testInstance.Path) 337new DirectoryInfo(testInstance.Path) 341new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 352File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), content); 355.WithWorkingDirectory(testInstance.Path) 359new DirectoryInfo(testInstance.Path) 363File.ReadAllText(Path.Join(testInstance.Path, "Program.cs")) 366new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 370File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.cs")) 378var appDirectory = Path.Join(testInstance.Path, "app"); 383.WithWorkingDirectory(testInstance.Path) 387new DirectoryInfo(Path.Join(testInstance.Path, "app")) 391new DirectoryInfo(Path.Join(testInstance.Path, "app", "Program")) 403File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 406File.WriteAllText(Path.Join(testInstance.Path, "my.json"), ""); 407File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), ""); 408File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), ""); 409Directory.CreateDirectory(Path.Join(testInstance.Path, "subdir")); 410File.WriteAllText(Path.Join(testInstance.Path, "subdir", "second.json"), ""); 413.WithWorkingDirectory(testInstance.Path) 417new DirectoryInfo(testInstance.Path) 421new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 425new DirectoryInfo(Path.Join(testInstance.Path, "Program", "subdir")) 434File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 438File.WriteAllText(Path.Join(testInstance.Path, "my.json"), ""); 439File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), ""); 440File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), ""); 443.WithWorkingDirectory(testInstance.Path) 447new DirectoryInfo(testInstance.Path) 451new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 460File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 464File.WriteAllText(Path.Join(testInstance.Path, "my.json"), ""); 465File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), ""); 466File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), ""); 469.WithWorkingDirectory(testInstance.Path) 473new DirectoryInfo(testInstance.Path) 477new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 489File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 492File.WriteAllText(Path.Join(testInstance.Path, "my.json"), ""); 493File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), ""); 494File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), ""); 495File.WriteAllText(Path.Join(testInstance.Path, "second.json"), ""); 497File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.targets"), """ 506.WithWorkingDirectory(testInstance.Path) 510new DirectoryInfo(testInstance.Path) 515new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 524File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 527File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), """ 530File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 541.WithWorkingDirectory(testInstance.Path) 548.WithWorkingDirectory(testInstance.Path) 552new DirectoryInfo(testInstance.Path) 557new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 563.WithWorkingDirectory(testInstance.Path) 573var subdir = Path.Join(testInstance.Path, "subdir"); 581File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 623var subdir = Path.Join(testInstance.Path, "subdir"); 628File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), """ 631File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 679File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 682File.WriteAllText(Path.Join(testInstance.Path, "my.json"), ""); 683File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), ""); 684File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), ""); 685File.WriteAllText(Path.Join(testInstance.Path, $"repo.{ext}"), ""); 688.WithWorkingDirectory(testInstance.Path) 692new DirectoryInfo(testInstance.Path) 696new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 711var filePath = Path.Join(testInstance.Path, "Program.cs"); 715.WithWorkingDirectory(testInstance.Path) 720new DirectoryInfo(Path.Join(testInstance.Path)) 732var filePath = Path.Join(testInstance.Path, "Program.cs"); 736.WithWorkingDirectory(testInstance.Path) 742new DirectoryInfo(Path.Join(testInstance.Path)) 757File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), originalSource); 760.WithWorkingDirectory(testInstance.Path) 764new DirectoryInfo(testInstance.Path) 768File.ReadAllText(Path.Join(testInstance.Path, "Program.cs")) 771new DirectoryInfo(Path.Join(testInstance.Path, "Program")) 775File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.cs")) 778File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.csproj")) 805File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 812File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 822.WithWorkingDirectory(testInstance.Path) 826File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.csproj")) 850File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 853File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 862.WithWorkingDirectory(testInstance.Path) 866File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.csproj")) 890File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), $""" 897File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), $""" 907.WithWorkingDirectory(testInstance.Path) 911File.ReadAllText(Path.Join(testInstance.Path, "Program", "Program.csproj")) 1046var libDir = Path.Join(testInstance.Path, "lib"); 1052filePath: Path.Join(testInstance.Path, "app", "Program.cs"),
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (16)
27var testProjectDirectory = testInstance.Path; 54var testProjectDirectory = testInstance.Path; 70string projectDirectory = Path.Combine(testInstance.Path, "MultiTFMTestApp"); 85var testProjectDirectory = testInstance.Path; 104var rootDir = testInstance.Path; 183.WithWorkingDirectory(Path.Combine(testAsset.Path, "MainProject")) 276var testProjectDirectory = testInstance.Path; 291var testProjectDirectory = testInstance.Path; 313var rootDir = testInstance.Path; 337var rootPath = testInstance.Path; 355var rootPath = testInstance.Path; 389var rootPath = testInstance.Path; 410.WithWorkingDirectory(testInstance.Path) 428var rootDir = testInstance.Path; 445File.WriteAllText(helloWorldAsset.Path + "/Directory.Build.props", "<Project><PropertyGroup><PublishRelease>true</PublishRelease></PropertyGroup></Project>"); 451var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release");
CommandTests\Reference\Add\GivenDotnetAddReference.cs (3)
58.Path); 63return new ProjDir(_testAssetsManager.CreateTestDirectory(testName: callingMethod, identifier: identifier).Path); 197var invalidProjDirectory = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, "InvalidProj");
CommandTests\Reference\List\GivenDotnetListReference.cs (5)
153var lib = NewLib(_testAssetsManager.CreateTestDirectory().Path); 170var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 193var testDir = _testAssetsManager.CreateTestDirectory().Path; 214var testDir = _testAssetsManager.CreateTestDirectory().Path; 236.Path);
CommandTests\Reference\Remove\GivenDotnetRemoveP2P.cs (2)
58.Path); 63return new ProjDir(_testAssetsManager.CreateTestDirectory(testName: callingMethod, identifier: identifier).Path);
CommandTests\Restore\GivenThatIWantToRestoreApp.cs (5)
21var rootPath = _testAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; 30.Path; 106.Path; 129var rootPath = _testAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; 156var rootPath = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Run\GivenDotnetRootEnv.cs (1)
81return testAsset.Path;
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (61)
25var testProjectDirectory = testInstance.Path; 45var testProjectDirectory = testInstance.Path; 62string projectDirectory = Path.Combine(testInstance.Path, "MultiTFMTestApp"); 79.WithWorkingDirectory(testInstance.Path) 96var testProjectDirectory = testInstance.Path; 112var testProjectDirectory = testInstance.Path; 128var testProjectDirectory = testInstance.Path; 148.WithWorkingDirectory(testInstance.Path) 161var projectFile = Path.Combine(testInstance.Path, testAppName + ".csproj"); 164.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName) 178var testProjectDirectory = testInstance.Path; 181.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName) 195var projectFile = Path.Combine(testInstance.Path, testAppName + ".csproj"); 198.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName) 221var rootPath = _testAssetsManager.CreateTestDirectory().Path; 257.WithWorkingDirectory(testInstance.Path) 270var testProjectDirectory = testInstance.Path; 287var testProjectDirectory = testInstance.Path; 304var testProjectDirectory = testInstance.Path; 321var testProjectDirectory = testInstance.Path; 338var testProjectDirectory = testInstance.Path; 355var testProjectDirectory = testInstance.Path; 372var testProjectDirectory = testInstance.Path; 382{Path.Join(testInstance.Path, "Properties", "launchSettings.json")} 383{Path.Join(testInstance.Path, "MSBuildTestApp.run.json")} 394var testProjectDirectory = testInstance.Path; 413var testProjectDirectory = testInstance.Path; 434var testProjectDirectory = testInstance.Path; 454var testProjectDirectory = testInstance.Path; 474var testProjectDirectory = testInstance.Path; 494var testProjectDirectory = testInstance.Path; 513var testProjectDirectory = testInstance.Path; 534var testProjectDirectory = testInstance.Path; 553var testProjectDirectory = testInstance.Path; 572var testProjectDirectory = testInstance.Path; 589var testProjectDirectory = testInstance.Path; 606var testProjectDirectory = testInstance.Path; 625var testProjectDirectory = testInstance.Path; 644var testProjectDirectory = testInstance.Path; 662var testProjectDirectory = testInstance.Path; 681.WithWorkingDirectory(testInstance.Path) 703.WithWorkingDirectory(testInstance.Path) 724.WithWorkingDirectory(testInstance.Path) 740.WithWorkingDirectory(testInstance.Path) 756.WithWorkingDirectory(testInstance.Path) 769.WithWorkingDirectory(testInstance.Path) 785.WithWorkingDirectory(testInstance.Path) 800.WithWorkingDirectory(testInstance.Path) 817.WithWorkingDirectory(testInstance.Path) 834.WithWorkingDirectory(testInstance.Path) 851.WithWorkingDirectory(testInstance.Path) 869.WithWorkingDirectory(testInstance.Path) 888.WithWorkingDirectory(testInstance.Path) 907.WithWorkingDirectory(testInstance.Path) 927.WithWorkingDirectory(testInstance.Path) 944.WithWorkingDirectory(testInstance.Path) 961.WithWorkingDirectory(testInstance.Path) 981.WithWorkingDirectory(testInstance.Path) 998.WithWorkingDirectory(testInstance.Path) 1010var nonExistentProject = Path.Combine(tempDir.Path, "nonexistent.csproj"); 1013.WithWorkingDirectory(tempDir.Path)
CommandTests\Run\GivenDotnetRunBuildsVbProj.cs (9)
22var testProjectDirectory = testInstance.Path; 32{Path.Join(testInstance.Path, "My Project", "launchSettings.json")} 33{Path.Join(testInstance.Path, "VBTestApp.run.json")} 45.WithWorkingDirectory(testInstance.Path) 66.WithWorkingDirectory(testInstance.Path) 84.WithWorkingDirectory(testInstance.Path) 101var testProjectDirectory = testInstance.Path; 121var testProjectDirectory = testInstance.Path; 142var testProjectDirectory = testInstance.Path;
CommandTests\Run\GivenDotnetRunIsInterrupted.cs (3)
29.WithWorkingDirectory(asset.Path); 90.WithWorkingDirectory(asset.Path); 151.WithWorkingDirectory(asset.Path);
CommandTests\Run\GivenDotnetRunUsesTargetExtension.cs (2)
24var testProjectDirectory = testInstance.Path; 50var testProjectDirectory = testInstance.Path;
CommandTests\Run\GivenThatWeCanPassNonProjectFilesToDotnetRun.cs (1)
20.Path;
CommandTests\Run\RunFileTests.cs (404)
153var programPath = Path.Join(testInstance.Path, "Program.cs"); 160.WithWorkingDirectory(testInstance.Path) 173testInstance.Path, 185File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 188.WithWorkingDirectory(testInstance.Path) 195File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), $""" 206.WithWorkingDirectory(testInstance.Path) 212.WithWorkingDirectory(testInstance.Path) 218.WithWorkingDirectory(testInstance.Path) 223new DotnetCommand(Log, Path.Join(testInstance.Path, "Program.cs")) 224.WithWorkingDirectory(testInstance.Path) 230.WithWorkingDirectory(testInstance.Path) 238.WithWorkingDirectory(testInstance.Path) 248.WithWorkingDirectory(testInstance.Path) 258.WithWorkingDirectory(testInstance.Path) 275File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 278.WithWorkingDirectory(testInstance.Path) 291testInstance.Path, 303File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 305var dirName = Path.GetFileName(testInstance.Path); 308.WithWorkingDirectory(Path.GetDirectoryName(testInstance.Path)!) 321File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 324.WithWorkingDirectory(testInstance.Path) 341File.WriteAllText(Path.Join(testInstance.Path, cmd), """ 345File.WriteAllText(Path.Join(testInstance.Path, $"dotnet-{cmd}"), """ 352.WithWorkingDirectory(testInstance.Path) 367.WithWorkingDirectory(testInstance.Path) 374.WithWorkingDirectory(testInstance.Path) 389File.WriteAllText(Path.Join(testInstance.Path, "test.dll"), """ 396.WithWorkingDirectory(testInstance.Path) 404.WithWorkingDirectory(testInstance.Path) 416File.WriteAllText(Path.Join(testInstance.Path, "complog"), """ 422.WithWorkingDirectory(testInstance.Path) 427.WithWorkingDirectory(testInstance.Path) 433.WithWorkingDirectory(testInstance.Path) 440.WithWorkingDirectory(testInstance.Path) 447.WithWorkingDirectory(testInstance.Path) 499.WithWorkingDirectory(testInstance.Path) 503.And.HaveStdErrContaining(string.Format(CliCommandStrings.RunCommandExceptionNoProjects, testInstance.Path, RunCommandParser.ProjectOption.Name)); 517File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 519path ??= testInstance.Path; 522.WithWorkingDirectory(testInstance.Path) 527testInstance.Path, 538File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 541.WithWorkingDirectory(testInstance.Path) 546testInstance.Path, 558File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 559File.WriteAllText(Path.Join(testInstance.Path, "App.csproj"), s_consoleProject); 562.WithWorkingDirectory(testInstance.Path) 575Directory.CreateDirectory(Path.Join(testInstance.Path, "file")); 576File.WriteAllText(Path.Join(testInstance.Path, "file", "Program.cs"), s_program); 577Directory.CreateDirectory(Path.Join(testInstance.Path, "proj")); 578File.WriteAllText(Path.Join(testInstance.Path, "proj", "App.csproj"), s_consoleProject); 581.WithWorkingDirectory(Path.Join(testInstance.Path, "proj")) 593Directory.CreateDirectory(Path.Join(testInstance.Path, "file")); 594File.WriteAllText(Path.Join(testInstance.Path, "file", "Program.cs"), s_program); 595Directory.CreateDirectory(Path.Join(testInstance.Path, "proj")); 596File.WriteAllText(Path.Join(testInstance.Path, "proj", "App.csproj"), s_consoleProject); 599.WithWorkingDirectory(Path.Join(testInstance.Path, "proj")) 618File.WriteAllText(Path.Join(testInstance.Path, fileName), """ 624.WithWorkingDirectory(testInstance.Path) 641File.WriteAllText(Path.Join(testInstance.Path, fileName), s_program); 644.WithWorkingDirectory(testInstance.Path) 649testInstance.Path, 657File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 658File.WriteAllText(Path.Join(testInstance.Path, "Program2.cs"), s_program); 661.WithWorkingDirectory(testInstance.Path) 667.WithWorkingDirectory(testInstance.Path) 682.WithWorkingDirectory(testInstance.Path) 687testInstance.Path, 698File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), s_util); 701.WithWorkingDirectory(testInstance.Path) 714File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), s_util); 717.WithWorkingDirectory(testInstance.Path) 722testInstance.Path, 733File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_programDependingOnUtil); 734File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), s_util); 737.WithWorkingDirectory(testInstance.Path) 743File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), $""" 749.WithWorkingDirectory(testInstance.Path) 764File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_programDependingOnUtil); 765File.WriteAllText(Path.Join(testInstance.Path, "Util.cs"), s_util); 768.WithWorkingDirectory(testInstance.Path) 790File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 791Directory.CreateDirectory(Path.Join(testInstance.Path, "nested")); 792File.WriteAllText(Path.Join(testInstance.Path, "nested", "App.csproj"), s_consoleProject); 795.WithWorkingDirectory(testInstance.Path) 809File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 810File.WriteAllText(Path.Join(testInstance.Path, "App.csproj"), s_consoleProject); 812var dirName = Path.GetFileName(testInstance.Path); 814var workDir = Path.GetDirectoryName(testInstance.Path)!; 833File.Delete(Path.Join(testInstance.Path, "MSBuildTestApp.csproj")); 836.WithWorkingDirectory(testInstance.Path) 849File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), string.Empty); 852.WithWorkingDirectory(testInstance.Path) 865File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 866File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 875.WithWorkingDirectory(testInstance.Path) 888File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 891File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 900.WithWorkingDirectory(testInstance.Path) 909.WithWorkingDirectory(testInstance.Path) 914.WithWorkingDirectory(Path.Join(testInstance.Path, "Program")) 929var sdkDir = Path.Join(testInstance.Path, "MySdk"); 959var appDir = Path.Join(testInstance.Path, "app"); 976var packagesDir = Path.Join(testInstance.Path, ".packages"); 1007File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1008File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.targets"), """ 1019.WithWorkingDirectory(testInstance.Path) 1032File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1033File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.targets"), """ 1042.WithWorkingDirectory(testInstance.Path) 1062File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1065.WithWorkingDirectory(testInstance.Path) 1081File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1084.WithWorkingDirectory(testInstance.Path) 1089testInstance.Path, 1100File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1107.WithWorkingDirectory(testInstance.Path) 1124File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1131.WithWorkingDirectory(testInstance.Path) 1136new DirectoryInfo(testInstance.Path) 1146File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1153.WithWorkingDirectory(testInstance.Path) 1157new DirectoryInfo(testInstance.Path) 1175File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1178.WithWorkingDirectory(testInstance.Path) 1185new DirectoryInfo(testInstance.Path) 1195File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1198.WithWorkingDirectory(testInstance.Path) 1206new DirectoryInfo(testInstance.Path) 1216File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1219.WithWorkingDirectory(testInstance.Path) 1224new DirectoryInfo(testInstance.Path) 1237File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1240.WithWorkingDirectory(testInstance.Path) 1245new DirectoryInfo(testInstance.Path) 1258File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 1261.WithWorkingDirectory(testInstance.Path) 1266string binaryLogPath = Path.Join(testInstance.Path, "msbuild.binlog"); 1281var programFile = Path.Join(testInstance.Path, "Program.cs"); 1285.WithWorkingDirectory(testInstance.Path) 1306var programFile = Path.Join(testInstance.Path, "Program.cs"); 1310.WithWorkingDirectory(testInstance.Path) 1323var programFile = Path.Join(testInstance.Path, "Program.cs"); 1327.WithWorkingDirectory(testInstance.Path) 1339File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 1345.WithWorkingDirectory(testInstance.Path) 1352File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 1357.WithWorkingDirectory(testInstance.Path) 1372File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_programReadingEmbeddedResource); 1373File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx); 1376.WithWorkingDirectory(testInstance.Path) 1384File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), $""" 1390.WithWorkingDirectory(testInstance.Path) 1408File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_programReadingEmbeddedResource); 1409File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx); 1410File.WriteAllText(Path.Join(testInstance.Path, $"repo.{ext}"), ""); 1415.WithWorkingDirectory(testInstance.Path) 1425var programFile = Path.Join(testInstance.Path, "Program.cs"); 1434.WithWorkingDirectory(testInstance.Path) 1441.WithWorkingDirectory(testInstance.Path) 1447.WithWorkingDirectory(testInstance.Path) 1457var programFile = Path.Join(testInstance.Path, "Program.cs"); 1466.WithWorkingDirectory(testInstance.Path) 1473.WithWorkingDirectory(testInstance.Path) 1479.WithWorkingDirectory(testInstance.Path) 1484.WithWorkingDirectory(testInstance.Path) 1494File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 1501var programFile = Path.Join(testInstance.Path, "Program.cs"); 1509.WithWorkingDirectory(testInstance.Path) 1518var programFile = Path.Join(testInstance.Path, "Program.cs"); 1529.WithWorkingDirectory(testInstance.Path) 1539var programFile = Path.Join(testInstance.Path, "Program.cs"); 1548.WithWorkingDirectory(testInstance.Path) 1555.WithWorkingDirectory(testInstance.Path) 1562.WithWorkingDirectory(testInstance.Path) 1569.WithWorkingDirectory(testInstance.Path) 1579var programFile = Path.Join(testInstance.Path, "Program.cs"); 1588.WithWorkingDirectory(testInstance.Path) 1595.WithWorkingDirectory(testInstance.Path) 1603.WithWorkingDirectory(testInstance.Path) 1610.WithWorkingDirectory(testInstance.Path) 1620var programFile = Path.Join(testInstance.Path, "lib.cs"); 1630.WithWorkingDirectory(testInstance.Path) 1635.WithWorkingDirectory(testInstance.Path) 1648var programFile = Path.Join(testInstance.Path, "lib.cs"); 1658File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 1670.WithWorkingDirectory(testInstance.Path) 1675.WithWorkingDirectory(testInstance.Path) 1681.WithWorkingDirectory(testInstance.Path) 1694var programFile = Path.Join(testInstance.Path, "module.cs"); 1705.WithWorkingDirectory(testInstance.Path) 1710.WithWorkingDirectory(testInstance.Path) 1723var programFile = Path.Join(testInstance.Path, "winexe.cs"); 1733.WithWorkingDirectory(testInstance.Path) 1738.WithWorkingDirectory(testInstance.Path) 1748var programFile = Path.Join(testInstance.Path, "exe.cs"); 1758.WithWorkingDirectory(testInstance.Path) 1763.WithWorkingDirectory(testInstance.Path) 1773var programFile = Path.Join(testInstance.Path, "exe.cs"); 1783File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 1795.WithWorkingDirectory(testInstance.Path) 1800.WithWorkingDirectory(testInstance.Path) 1806.WithWorkingDirectory(testInstance.Path) 1816var programFile = Path.Join(testInstance.Path, "appcontainerexe.cs"); 1826.WithWorkingDirectory(testInstance.Path) 1831.WithWorkingDirectory(testInstance.Path) 1844var programFile = Path.Join(testInstance.Path, "Program.cs"); 1850var publishDir = Path.Join(testInstance.Path, "artifacts"); 1854.WithWorkingDirectory(testInstance.Path) 1875var programFile = Path.Join(testInstance.Path, "Program.cs"); 1881var publishDir = Path.Join(testInstance.Path, "artifacts"); 1885.WithWorkingDirectory(testInstance.Path) 1903var programFile = Path.Join(testInstance.Path, "Program.cs"); 1909File.WriteAllText(Path.Join(testInstance.Path, "config.json"), """ 1916var publishDir = Path.Join(testInstance.Path, "artifacts"); 1920.WithWorkingDirectory(testInstance.Path) 1934var programFile = Path.Join(testInstance.Path, "Program.cs"); 1940var publishDir = Path.Join(testInstance.Path, "artifacts"); 1944.WithWorkingDirectory(testInstance.Path) 1952new DirectoryInfo(testInstance.Path).File("msbuild.binlog").Should().Exist(); 1959var programFile = Path.Join(testInstance.Path, "MyCustomProgram.cs"); 1965var publishDir = Path.Join(testInstance.Path, "artifacts"); 1969.WithWorkingDirectory(testInstance.Path) 1982var programFile = Path.Join(testInstance.Path, "Program.cs"); 1985var customPublishDir = Path.Join(testInstance.Path, "custom-publish"); 1989.WithWorkingDirectory(testInstance.Path) 2002var programFile = Path.Join(testInstance.Path, "Program.cs"); 2003var publishDir = Path.Join(testInstance.Path, "directive-publish"); 2012.WithWorkingDirectory(testInstance.Path) 2025var subDir = Directory.CreateDirectory(Path.Combine(testInstance.Path, "subdir")); 2037.WithWorkingDirectory(testInstance.Path) 2041new DirectoryInfo(testInstance.Path).Sub("subdir").Sub("artifacts").Sub("Program") 2050var programFile = Path.Join(testInstance.Path, "MyFileBasedTool.cs"); 2060.WithWorkingDirectory(testInstance.Path) 2068var outputDir = Path.Join(testInstance.Path, "artifacts"); 2073.WithWorkingDirectory(testInstance.Path) 2083.WithWorkingDirectory(testInstance.Path) 2096var programFile = Path.Join(testInstance.Path, "MyFileBasedTool.cs"); 2104.WithWorkingDirectory(testInstance.Path) 2112var outputDir = Path.Join(testInstance.Path, "custom"); 2117.WithWorkingDirectory(testInstance.Path) 2126.WithWorkingDirectory(testInstance.Path) 2136var programFile = Path.Join(testInstance.Path, "Program.cs"); 2140.WithWorkingDirectory(testInstance.Path) 2152.WithWorkingDirectory(testInstance.Path) 2166var programFile = Path.Join(testInstance.Path, "Program.cs"); 2174.WithWorkingDirectory(testInstance.Path) 2188.WithWorkingDirectory(testInstance.Path) 2204File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program + """ 2208var fullPath = Path.Join(testInstance.Path, relativePath); 2217.WithWorkingDirectory(testInstance.Path) 2228.WithWorkingDirectory(testInstance.Path) 2237.WithWorkingDirectory(testInstance.Path) 2253File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program + """ 2257Directory.CreateDirectory(Path.Join(testInstance.Path, "Properties")); 2258string launchSettings = Path.Join(testInstance.Path, "Properties", "launchSettings.json"); 2260string runJson = Path.Join(testInstance.Path, "Program.run.json"); 2264.WithWorkingDirectory(testInstance.Path) 2274.WithWorkingDirectory(testInstance.Path) 2284.WithWorkingDirectory(testInstance.Path) 2305File.WriteAllText(Path.Join(testInstance.Path, "First.cs"), source); 2306File.WriteAllText(Path.Join(testInstance.Path, "First.run.json"), s_launchSettings.Replace("TestProfileMessage", "First")); 2307File.WriteAllText(Path.Join(testInstance.Path, "Second.cs"), source); 2308File.WriteAllText(Path.Join(testInstance.Path, "Second.run.json"), s_launchSettings.Replace("TestProfileMessage", "Second")); 2312.WithWorkingDirectory(testInstance.Path) 2321.WithWorkingDirectory(testInstance.Path) 2334File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2341.WithWorkingDirectory(testInstance.Path) 2351File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2358.WithWorkingDirectory(testInstance.Path) 2368File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2377.WithWorkingDirectory(testInstance.Path) 2390File.WriteAllText(Path.Join(testInstance.Path, "Directory.Packages.props"), """ 2400File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2409.WithWorkingDirectory(testInstance.Path) 2423File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2433.WithWorkingDirectory(testInstance.Path) 2442File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2448.WithWorkingDirectory(testInstance.Path) 2462var libDir = Path.Join(testInstance.Path, "Lib"); 2481var appDir = Path.Join(testInstance.Path, "App"); 2500File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2506.WithWorkingDirectory(testInstance.Path) 2509.And.HaveStdErrContaining(DirectiveError(Path.Join(testInstance.Path, "Program.cs"), 1, CliCommandStrings.InvalidProjectDirective, 2510string.Format(CliStrings.CouldNotFindProjectOrDirectory, Path.Join(testInstance.Path, "wrong.csproj")))); 2512File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2518.WithWorkingDirectory(testInstance.Path) 2521.And.HaveStdErrContaining(DirectiveError(Path.Join(testInstance.Path, "Program.cs"), 1, CliCommandStrings.InvalidProjectDirective, 2522string.Format(CliStrings.CouldNotFindProjectOrDirectory, Path.Join(testInstance.Path, "dir/")))); 2524Directory.CreateDirectory(Path.Join(testInstance.Path, "dir")); 2528.WithWorkingDirectory(testInstance.Path) 2531.And.HaveStdErrContaining(DirectiveError(Path.Join(testInstance.Path, "Program.cs"), 1, CliCommandStrings.InvalidProjectDirective, 2532string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, Path.Join(testInstance.Path, "dir/")))); 2534File.WriteAllText(Path.Join(testInstance.Path, "dir", "proj1.csproj"), "<Project />"); 2535File.WriteAllText(Path.Join(testInstance.Path, "dir", "proj2.csproj"), "<Project />"); 2539.WithWorkingDirectory(testInstance.Path) 2542.And.HaveStdErrContaining(DirectiveError(Path.Join(testInstance.Path, "Program.cs"), 1, CliCommandStrings.InvalidProjectDirective, 2543string.Format(CliStrings.MoreThanOneProjectInDirectory, Path.Join(testInstance.Path, "dir/")))); 2569var programPath = Path.Join(testInstance.Path, "Program.cs"); 2581.WithWorkingDirectory(testInstance.Path) 2588.WithWorkingDirectory(testInstance.Path) 2595.WithWorkingDirectory(testInstance.Path) 2624string entryPointPath = Path.Join(testInstance.Path, fileName); 2633.WithWorkingDirectory(testInstance.Path) 2639var msbuildCall = FindCompilerCall(Path.Join(testInstance.Path, "msbuild.binlog")); 2844.WithWorkingDirectory(testInstance.Path) 2901string entryPointPath = Path.Join(testInstance.Path, fileName); 2917.WithWorkingDirectory(testInstance.Path) 2930.WithWorkingDirectory(testInstance.Path) 2980File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 2985var artifactsDir = VirtualProjectBuildingCommand.GetArtifactsPath(Path.Join(testInstance.Path, "Program.cs")); 2995File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 3002File.WriteAllText(Path.Join(testInstance.Path, "Program2.cs"), "test"); 3007string buildPropsFile = Path.Join(testInstance.Path, "Directory.Build.props"); 3027string importedFile = Path.Join(testInstance.Path, "Settings.props"); 3089.WithWorkingDirectory(testInstance.Path) 3109.WithWorkingDirectory(testInstance.Path) 3114var binlogs = new DirectoryInfo(testInstance.Path) 3136File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 3139.WithWorkingDirectory(testInstance.Path) 3156File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), code); 3157File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx); 3162File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx.Replace("TestValue", "UpdatedValue")); 3167File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), "//v2\n" + code); 3185File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), code); 3186File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx); 3191File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx.Replace("TestValue", "UpdatedValue")); 3196File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), "//v2\n" + code); 3203File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), "//v3\n" + code); 3220File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), code); 3221File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx); 3226File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), "//v2\n" + code); 3231File.WriteAllText(Path.Join(testInstance.Path, "Resources.resx"), s_resx.Replace("TestValue", "UpdatedValue")); 3236File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), "//v3\n" + code); 3248File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3253var artifactsDir = VirtualProjectBuildingCommand.GetArtifactsPath(Path.Join(testInstance.Path, "Program.cs")); 3258File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3279File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3285.WithWorkingDirectory(testInstance.Path) 3293File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3298.WithWorkingDirectory(testInstance.Path) 3314File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3326.WithWorkingDirectory(testInstance.Path) 3335File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), "<Project />"); 3338.WithWorkingDirectory(testInstance.Path) 3365File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3371var artifactsDir = VirtualProjectBuildingCommand.GetArtifactsPath(Path.Join(testInstance.Path, "Program.cs")); 3374File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), "<Project />"); 3377.WithWorkingDirectory(testInstance.Path) 3383File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 3393File.Delete(Path.Join(testInstance.Path, "Directory.Build.props")); 3396.WithWorkingDirectory(testInstance.Path) 3411File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 3414var artifactsDir = VirtualProjectBuildingCommand.GetArtifactsPath(Path.Join(testInstance.Path, "Program.cs")); 3418.WithEnvironmentVariable("NUGET_PACKAGES", Path.Join(testInstance.Path, "packages")) 3419.WithWorkingDirectory(testInstance.Path) 3426.WithEnvironmentVariable("NUGET_PACKAGES", Path.Join(testInstance.Path, "packages")) 3427.WithWorkingDirectory(testInstance.Path) 3432File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """ 3437.WithEnvironmentVariable("NUGET_PACKAGES", Path.Join(testInstance.Path, "packages")) 3438.WithWorkingDirectory(testInstance.Path) 3453var programPath = Path.Join(testInstance.Path, programFileName); 3470var programPath = Path.Join(testInstance.Path, "Program.cs"); 3500var programPath = Path.Join(testInstance.Path, "Program.cs"); 3559var programPath = Path.Join(testInstance.Path, programFileName); 3582var programPath = Path.Join(testInstance.Path, "Program.cs"); 3620var programPath = Path.Join(testInstance.Path, "Program.cs"); 3651var libDir = Path.Join(testInstance.Path, "Lib"); 3672var appDir = Path.Join(testInstance.Path, "App"); 3714File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), $""" 3732var programPath = Path.Join(testInstance.Path, "Program.cs"); 3763var programPath = Path.Join(testInstance.Path, "Program.cs"); 3798var programPath = Path.Join(testInstance.Path, "Program.cs"); 3859<RuntimeHostConfigurationOption Include="EntryPointFileDirectoryPath" Value="{testInstance.Path}" /> 3875var programPath = Path.Join(testInstance.Path, "Program.cs"); 3924<RuntimeHostConfigurationOption Include="EntryPointFileDirectoryPath" Value="{testInstance.Path}" /> 3943var programPath = Path.Join(testInstance.Path, "Program.cs"); 3992<RuntimeHostConfigurationOption Include="EntryPointFileDirectoryPath" Value="{testInstance.Path}" /> 4028var programPath = Path.Join(testInstance.Path, "Program.cs"); 4055var filePath = Path.Join(testInstance.Path, "Program.cs"); 4070.WithWorkingDirectory(testInstance.Path) 4080File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), """" 4086.WithWorkingDirectory(testInstance.Path) 4089.And.HaveStdOut($"EntryPointFileDirectoryPath: {testInstance.Path}"); 4097File.WriteAllText(Path.Join(testInstance.Path, fileName), """ 4102var relativePath = Path.GetRelativePath(Directory.GetCurrentDirectory(), Path.Join(testInstance.Path, fileName)); 4114var dirWithSpaces = Path.Join(testInstance.Path, "dir with spaces"); 4123.WithWorkingDirectory(testInstance.Path) 4134File.WriteAllText(Path.Join(testInstance.Path, fileName), """ 4140.WithWorkingDirectory(testInstance.Path) 4143.And.HaveStdOut($"EntryPointFileDirectoryPath: {testInstance.Path}"); 4151var filePath = Path.Join(testInstance.Path, unicodeFileName); 4158.WithWorkingDirectory(testInstance.Path) 4169File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 4172.WithWorkingDirectory(testInstance.Path) 4199File.WriteAllText(Path.Join(testInstance.Path, "Program.cs"), s_program); 4201File.WriteAllText(Path.Join(testInstance.Path, "Directory.Build.props"), """ 4216.WithWorkingDirectory(testInstance.Path) 4221File.WriteAllText(Path.Join(testInstance.Path, "Program.csproj"), s_consoleProject); 4224.WithWorkingDirectory(testInstance.Path) 4236var result = new DirectoryInfo(testInstance.Path) 4245File.Delete(Path.Join(testInstance.Path, file));
CommandTests\Run\RunParserTests.cs (3)
22var newWorkingDir = testAsset.Path; 36var newWorkingDir = testAsset.Path; 50var newWorkingDir = testAsset.Path;
CommandTests\Sdk\Check\GivenDotnetSdkCheck.cs (1)
196var dotnetRoot = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Solution\Add\GivenDotnetSlnAdd.cs (40)
119.Path; 141.Path; 167.Path; 185.Path; 204.Path; 226.Path; 262.Path; 305.Path; 338.Path; 364.Path; 393.Path; 422.Path; 450.Path; 477.Path; 520.Path; 555.Path; 575.Path; 623.Path; 658.Path; 702.Path; 723.Path; 747.Path; 785.Path; 812.Path; 843.Path; 863.Path; 886.Path; 911.Path; 936.Path; 961.Path; 984.Path; 1007.Path; 1031.Path; 1058.Path; 1086.Path; 1118.Path; 1146.Path; 1173.Path; 1283.Path; 1313.Path;
CommandTests\Solution\List\GivenDotnetSlnList.cs (10)
95.Path; 116.Path; 140.Path; 159.Path; 179.Path; 203.Path; 227.Path; 254.Path; 274.Path; 294.Path;
CommandTests\Solution\Migrate\GivenDotnetSlnMigrate.cs (1)
18.Path;
CommandTests\Solution\Remove\GivenDotnetSlnRemove.cs (23)
100.Path; 121.Path; 147.Path; 165.Path; 184.Path; 205.Path; 228.Path; 259.Path; 290.Path; 315.Path; 347.Path; 383.Path; 413.Path; 442.Path; 466.Path; 490.Path; 534.Path; 577.Path; 607.Path; 632.Path; 657.Path; 682.Path; 702.Path;
CommandTests\Store\GivenDotnetStoresAndPublishesProjects.cs (7)
25var testProjectDirectory = testInstance.Path; 29var profileProjectPath = _testAssetsManager.CopyTestAsset(profileProjectName).WithSource().Path; 76var testProjectDirectory = testInstance.Path; 77var profileProjectPath = _testAssetsManager.CopyTestAsset(profileProjectName).WithSource().Path; 113var testProjectDirectory = testInstance.Path; 118var profileProjectPath = _testAssetsManager.CopyTestAsset(profileProjectName).WithSource().Path; 122var profileProjectPath1 = _testAssetsManager.CopyTestAsset(profileProjectName1).WithSource().Path;
CommandTests\Test\GivenDotnetTestBuildsAndDiscoversTests.cs (7)
26.WithWorkingDirectory(testInstance.Path) 49.WithWorkingDirectory(testInstance.Path) 72.WithWorkingDirectory(testInstance.Path) 93.WithWorkingDirectory(testInstance.Path) 118.WithWorkingDirectory(testInstance.Path) 139.WithWorkingDirectory(testInstance.Path) 159.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs (19)
32string runsettings = GetRunsetting(testInstance.Path); 35.WithWorkingDirectory(testInstance.Path) 42"--diag", testInstance.Path + "/logs/"); 56string runsettings = GetRunsetting(testInstance.Path); 58new PublishCommand(Log, Path.Combine(testInstance.Path, "sln.sln")).Execute("/p:Configuration=Release").Should().Pass(); 61.WithWorkingDirectory(testInstance.Path) 65Directory.GetFiles(testInstance.Path, "test1.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 66Directory.GetFiles(testInstance.Path, "test2.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 67Directory.GetFiles(testInstance.Path, "test3.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 71"--diag:" + testInstance.Path + "/logs/"); 85string runsettings = GetRunsetting(testInstance.Path); 87new PublishCommand(Log, Path.Combine(testInstance.Path, "sln.sln")).Execute("/p:Configuration=Release").Should().Pass(); 90.WithWorkingDirectory(testInstance.Path) 93Directory.GetFiles(testInstance.Path, "test1.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 94Directory.GetFiles(testInstance.Path, "test2.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 95Directory.GetFiles(testInstance.Path, "test3.dll", SearchOption.AllDirectories).SingleOrDefault(x => x.Contains("publish")), 99$"--diag:{testInstance.Path}/logs/"); 162string testProjectDirectory = testInstance.Path; 177string testProjectDirectory = testInstance.Path;
CommandTests\Test\GivenDotnetTestBuildsAndRunsHelp.cs (3)
25.WithWorkingDirectory(testInstance.Path) 49.WithWorkingDirectory(testInstance.Path) 74.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs (5)
26var binDirectory = new FileInfo($"{testInstance.Path}{Path.DirectorySeparatorChar}bin").Directory; 30.WithWorkingDirectory(testInstance.Path) 66var binDirectory = new FileInfo($"{testInstance.Path}{Path.DirectorySeparatorChar}bin").Directory; 72.WithWorkingDirectory(testInstance.Path) 109.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (13)
49var testProjectDirectory = testInstance.Path; 77var testProjectDirectory = testInstance.Path; 94var testProjectDirectory = testInstance.Path; 111var testProjectDirectory = testInstance.Path; 145.WithWorkingDirectory(testInstance.Path) 293.Path; 303pkgDir = _testAssetsManager.CreateTestDirectory(identifier: "pkgs").Path; 383var rootPath = testInstance.Path; 621var testProjectDirectory = testInstance.Path; 645var testProjectDirectory = testInstance.Path; 668var testProjectDirectory = testInstance.Path; 696var testProjectDirectory = testInstance.Path; 870var testProjectDirectory = testInstance.Path;
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs (4)
25.Path; 64var testProjectDirectory = testInstance.Path; 105var testProjectDirectory = testInstance.Path; 134string projectDirectory = Path.Combine(testInstance.Path, "XUnitProject");
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsprojWithCorrectTestRunParameters.cs (1)
87var testProjectDirectory = testInstance.Path;
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromDll.cs (3)
24var testRoot = testAsset.Path; 60var testRoot = testAsset.Path; 90var testRoot = testAsset.Path;
CommandTests\Test\GivenDotnetTestBuildsAndRunsTests.cs (22)
26.WithWorkingDirectory(testInstance.Path) 51.WithWorkingDirectory(testInstance.Path) 78.WithWorkingDirectory(testInstance.Path) 104.WithWorkingDirectory(testInstance.Path) 130File.Move(Path.Join(testInstance.Path, "Properties", "launchSettings.json"), Path.Join(testInstance.Path, "TestProjectWithLaunchSettings.run.json")); 134.WithWorkingDirectory(testInstance.Path) 162.WithWorkingDirectory(testInstance.Path) 181.WithWorkingDirectory(testInstance.Path) 201.WithWorkingDirectory(testInstance.Path) 226.WithWorkingDirectory(testInstance.Path) 256.WithWorkingDirectory(testInstance.Path) 276.WithWorkingDirectory(testInstance.Path) 296.WithWorkingDirectory(testInstance.Path) 316.WithWorkingDirectory(testInstance.Path) 336.WithWorkingDirectory(testInstance.Path) 362.WithWorkingDirectory(testInstance.Path) 390.WithWorkingDirectory(testInstance.Path) 416.WithWorkingDirectory(testInstance.Path) 436.WithWorkingDirectory(testInstance.Path) 450.WithWorkingDirectory(testInstance.Path) 489.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (5)
29.WithWorkingDirectory(testInstance.Path) 69.WithWorkingDirectory(testInstance.Path) 117.WithWorkingDirectory(testInstance.Path) 157.WithWorkingDirectory(testInstance.Path) 185.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs (3)
25.WithWorkingDirectory(testInstance.Path) 59testInstance.UpdateProjectFileWithMSTestPackageVersion(Path.Combine($@"{testInstance.Path}{PathUtility.GetDirectorySeparatorChar()}TestProject", "TestProject.csproj"), msTestVersion); 62.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (28)
28.WithWorkingDirectory(testInstance.Path) 47.WithWorkingDirectory(testInstance.Path) 67.WithWorkingDirectory(testInstance.Path) 85.WithWorkingDirectory($"{testInstance.Path}{Path.DirectorySeparatorChar}SolutionFilter") 104.WithWorkingDirectory(testInstance.Path) 123.WithWorkingDirectory(testInstance.Path) 144.WithWorkingDirectory(testInstance.Path) 164.WithWorkingDirectory(testInstance.Path) 184.WithWorkingDirectory(testInstance.Path) 204.WithWorkingDirectory(testInstance.Path) 223.WithWorkingDirectory(testInstance.Path) 243.WithWorkingDirectory(testInstance.Path) 271.WithWorkingDirectory(testInstance.Path) 291.WithWorkingDirectory(testInstance.Path) 309.WithWorkingDirectory(testInstance.Path) 329.WithWorkingDirectory(testInstance.Path) 350var binDirectory = new FileInfo($"{testInstance.Path}{Path.DirectorySeparatorChar}bin").Directory; 354.WithWorkingDirectory(testInstance.Path) 374.WithWorkingDirectory(testInstance.Path) 390.WithWorkingDirectory(testInstance.Path) 416.WithWorkingDirectory(testInstance.Path) 441.WithWorkingDirectory(testInstance.Path) 475.WithWorkingDirectory(testInstance.Path) 513.WithWorkingDirectory(testInstance.Path) 543.WithWorkingDirectory(testInstance.Path) 547Assert.True(File.Exists(Path.Combine(testInstance.Path, traceFile)), "Trace file should exist after test execution."); 561.WithWorkingDirectory(testInstance.Path) 565Assert.True(File.Exists(Path.Combine(testInstance.Path, traceFile)), "Trace file should exist after test execution.");
CommandTests\Test\GivenDotnetTestContainsEnvironmentVariables.cs (2)
36var testRoot = testAsset.Path; 65var testRoot = testAsset.Path;
CommandTests\Test\GivenDotnetTestContainsMSBuildParameters.cs (1)
29var testRoot = testAsset.Path;
CommandTests\Test\GivenDotnetTestForwardDotnetRootEnvironmentVariables.cs (1)
25var command = new DotnetTestCommand(Log, disableNewOutput: true).WithWorkingDirectory(testAsset.Path);
CommandTests\Test\GivenDotnetTestRunsConsoleAppWithoutHandshake.cs (1)
27.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\GivenDotnetTestsRunsInDifferentCultures.cs (1)
25var command = new DotnetTestCommand(Log, disableNewOutput: true).WithWorkingDirectory(testAsset.Path).WithCulture(locale);
CommandTests\Test\GivenDotnetTestsRunsWithDifferentCultures.cs (1)
23.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\MTPHelpSnapshotTests.cs (1)
25.WithWorkingDirectory(testInstance.Path)
CommandTests\Test\TestCommandValidationTests.cs (9)
22var testFilePath = Path.Combine(testDir.Path, filename); 24File.WriteAllText(Path.Combine(testDir.Path, "global.json"), 34.WithWorkingDirectory(testDir.Path) 48var subDir = Path.Combine(testDir.Path, "test_directory"); 50File.WriteAllText(Path.Combine(testDir.Path, "global.json"), 60.WithWorkingDirectory(testDir.Path) 76var dllPath = Path.Combine(testDir.Path, "test.dll"); 78File.WriteAllText(Path.Combine(testDir.Path, "global.json"), 88.WithWorkingDirectory(testDir.Path)
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (8)
121nugetConfig: new FilePath(Path.Combine(testAsset.Path, "NuGet.config")), 122rootConfigDirectory: new DirectoryPath(testAsset.Path), 124var nuGetPackageDownloader = new NuGetPackageDownloader(new DirectoryPath(testAsset.Path)); 629var testDir = _testAssetsManager.CreateTestDirectory().Path; 666var testDir = _testAssetsManager.CreateTestDirectory().Path; 933var testDir = _testAssetsManager.CreateTestDirectory().Path; 949var testDir = _testAssetsManager.CreateTestDirectory().Path; 976var testDir = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (2)
320var testDir = _testAssetsManager.CreateTestDirectory().Path; 393var testDir = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Tool\Run\ToolRunCommandTests.cs (2)
73fileSystem.File.WriteAllText(Path.Combine(testDirectoryRoot.Path, ManifestFilename), 76new ToolManifestFinder(new DirectoryPath(testDirectoryRoot.Path), fileSystem, new FakeDangerousFileDetector());
CommandTests\VSTest\VSTestTests.cs (3)
24var testRoot = testAsset.Path; 99var testRoot = testAsset.Path; 204var testProjectDirectory = testInstance.Path;
CommandTests\Workload\Clean\GivenDotnetWorkloadClean.cs (1)
30var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? $"userlocal-{cleanAll}" : $"default-{cleanAll}").Path;
CommandTests\Workload\Install\GivenDotnetWorkloadInstall.cs (12)
109var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 147var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 180var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 246var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path, 271var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path, "mockCachePath"); 330var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 351var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 398var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 472var testDirectory = _testAssetsManager.CreateTestDirectory(testName: testName, identifier: (userLocal ? "userlocal" : "default") + sdkVersion).Path; 504var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 530var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 554var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Workload\Install\GivenFileBasedWorkloadInstall.cs (1)
424var testDirectory = _testAssetsManager.CreateTestDirectory(testName, identifier: identifier).Path;
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (21)
97var testDir = _testAssetsManager.CreateTestDirectory().Path; 143var testDir = _testAssetsManager.CreateTestDirectory().Path; 221var testDir = _testAssetsManager.CreateTestDirectory(identifier: useOfflineCache.ToString()).Path; 300var testDir = _testAssetsManager.CreateTestDirectory().Path; 366var testDir = _testAssetsManager.CreateTestDirectory().Path; 421var testDir = _testAssetsManager.CreateTestDirectory().Path; 459var testDir = _testAssetsManager.CreateTestDirectory().Path; 502var testDir = _testAssetsManager.CreateTestDirectory().Path; 545var testDir = _testAssetsManager.CreateTestDirectory().Path; 586Directory.CreateDirectory(Path.Combine(testInstance.Path, ".dotnet")); 587File.WriteAllText(Path.Combine(testInstance.Path, ".dotnet", $".workloadAdvertisingUpdates{sdkFeatureBand}"), @"[""maui""]"); 589File.WriteAllText(Path.Combine(testInstance.Path, ".dotnet", $".workloadAdvertisingManifestSentinel{sdkFeatureBand}"), string.Empty); 593.WithEnvironmentVariable("DOTNET_CLI_HOME", testInstance.Path) 594.WithWorkingDirectory(testInstance.Path) 624Directory.CreateDirectory(Path.Combine(testInstance.Path, ".dotnet")); 625File.WriteAllText(Path.Combine(testInstance.Path, ".dotnet", $".workloadAdvertisingUpdates6.0.100"), @"[""maui""]"); 627File.WriteAllText(Path.Combine(testInstance.Path, ".dotnet", ".workloadAdvertisingManifestSentinel" + sdkFeatureBand.ToString()), string.Empty); 631.WithEnvironmentVariable("DOTNET_CLI_HOME", testInstance.Path) 632.WithWorkingDirectory(testInstance.Path) 648var testDir = _testAssetsManager.CreateTestDirectory().Path; 690var testDir = _testAssetsManager.CreateTestDirectory(testName: testName).Path;
CommandTests\Workload\Install\WorkloadGarbageCollectionTests.cs (1)
355_testDirectory = _testAssetsManager.CreateTestDirectory(testName, identifier: identifier).Path;
CommandTests\Workload\Install\WorkloadInstallAspireDeprecationTests.cs (3)
25var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 60var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 96var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Workload\List\GivenDotnetWorkloadList.cs (1)
99var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
CommandTests\Workload\List\GivenWorkloadInstallerAndWorkloadsInstalled.cs (1)
46_testDirectory = _testAssetsManager.CreateTestDirectory(identifier: identifier).Path;
CommandTests\Workload\Repair\GivenDotnetWorkloadRepair.cs (3)
37var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 63var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 113var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path;
CommandTests\Workload\Restore\DiscoverAllProjectsTests.cs (4)
20.Path; 32.Path; 53.Path; 68.Path;
CommandTests\Workload\Restore\GivenDotnetWorkloadRestore.cs (2)
28.Path; 51.Path;
CommandTests\Workload\Uninstall\GivenDotnetWorkloadUninstall.cs (5)
55var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 67var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 88var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 102var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 146var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path;
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (9)
115var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 201var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; 296string dotnetDir = Path.Combine(testDir.Path, "dotnet"); 297string userProfileDir = Path.Combine(testDir.Path, "userProfileDir"); 374var testDirectory = _testAssetsManager.CreateTestDirectory(testName: "GivenWorkloadUpdateItFindsGreatestWorkloadSetWithSpecifiedComponents").Path; 421var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: "cachePath").Path, "mockCachePath"); 486var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 587var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 625var testDirectory = _testAssetsManager.CreateTestDirectory(testName: testName, identifier).Path;
GivenThatDotNetRunsCommands.cs (2)
29.WithWorkingDirectory(testInstance.Path) 54var home = _testAssetsManager.CreateTestDirectory(identifier: "DOTNET_HOME").Path;
GivenThatICareAboutVBApps.cs (1)
31.WithWorkingDirectory(testInstance.Path)
GivenThatTheUserEnablesThePerfLog.cs (4)
20.WithEnvironmentVariable("DOTNET_PERFLOG_DIR", dir.Path) 24Assert.Empty(new DirectoryInfo(dir.Path).GetFiles()); 34.WithEnvironmentVariable("DOTNET_PERFLOG_DIR", dir.Path) 39DirectoryInfo logDir = new(dir.Path);
GivenThatTheUserIsRunningDotNetForTheFirstTime.cs (1)
22TestDirectory = testAssets.CreateTestDirectory(testName).Path;
GivenThatWeWantToBeBackwardsCompatibleWith1xProjects.cs (5)
22ChangeProjectTargetFramework(Path.Combine(testInstance.Path, $"{testAppName}.csproj"), target); 51ChangeProjectTargetFramework(Path.Combine(testInstance.Path, $"{testAppName}.csproj"), target); 57new PackCommand(Log, testInstance.Path) 69NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 77.WithWorkingDirectory(testInstance.Path)
PackagedCommandTests.cs (16)
28NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 35.WithWorkingDirectory(testInstance.Path) 50NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 69.WithWorkingDirectory(testInstance.Path) 85NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 127.WithWorkingDirectory(testInstance.Path) 141NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 148.WithWorkingDirectory(testInstance.Path) 162.WithWorkingDirectory(testInstance.Path) 178var appWithDepOnToolDir = new DirectoryInfo(testInstance.Path).Sub("AppWithDepOnTool"); 179var toolWithRandPkgNameDir = new DirectoryInfo(testInstance.Path).Sub("ToolWithRandomPackageName"); 180var pkgsDir = new DirectoryInfo(testInstance.Path).CreateSubdirectory("pkgs"); 220NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 225.WithWorkingDirectory(testInstance.Path) 236NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 245.WithWorkingDirectory(testInstance.Path)
ParserTests\ResponseFileTests.cs (2)
18var tempFileDir = _testAssetsManager.CreateTestDirectory().Path; 48var tempFileDir = _testAssetsManager.CreateTestDirectory().Path;
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
RuntimeConfigTests.cs (1)
126return Path.Combine(_testAssetsManager.CreateTestDirectory(callingMethod).Path, Path.GetTempFileName());
ShellShimTests\ShellShimRepositoryTests.cs (4)
100var testFolder = _testAssetsManager.CreateTestDirectory().Path; 425var tempDir = _testAssetsManager.CreateTestDirectory(identifier: tfm).Path; 510var outputDirectory = new DirectoryInfo(OutputPathCalculator.FromProject(testInstance.Path, testInstance).GetOutputDirectory(configuration: configuration)); 517return _testAssetsManager.CreateTestDirectory(testName: callingMethod, identifier: "cleanfolder" + identifier + Path.GetRandomFileName()).Path;
TelemetryTests\SenderTests.cs (1)
171string tempPath = Path.Combine(_testAssetsManager.CreateTestDirectory("TestStorageService", identifier: testName).Path, Path.GetTempFileName());
TelemetryTests\StorageTests.cs (1)
199return _testAssetsManager.CreateTestDirectory(callingMethod).Path;
dotnet-format.UnitTests (13)
MSBuild\MSBuildWorkspaceFinderTests.cs (12)
26testInstance.Path).Replace('/', Path.DirectorySeparatorChar); 27var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 39testInstance.Path).Replace('/', Path.DirectorySeparatorChar); 40var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 52testInstance.Path).Replace('/', Path.DirectorySeparatorChar); 53var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 65testInstance.Path).Replace('/', Path.DirectorySeparatorChar); 66var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 77var (isSolution, workspacePath) = MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path); 91var (isSolution, workspacePath) = MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path, "solution_b.sln"); 129var (isSolution, workspacePath) = MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path); 143var (isSolution, workspacePath) = MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path, "project_b.csproj");
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
dotnet-MsiInstallation.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
dotnet-new.IntegrationTests (40)
BaseIntegrationTest.cs (1)
145string testPath = testAsset.Path;
PostActionTests.Approval.cs (9)
13string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RestoreNuGet/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 44string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 67string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddPackageReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 98string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 129string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectToSolution/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 169string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/Instructions/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 191string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RestoreNuGet/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 215string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/UnknownPostAction", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 235string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path;
PostActionTests.cs (29)
30string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 63string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RestoreNuGet/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 99string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RestoreNuGet/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 137string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 172string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 214string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 263string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 312string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 345string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/DoNotRedirect", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 370string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/Redirect", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 395string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/RunScript/RedirectOnError", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 430string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 459string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddPackageReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 491string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddPackageReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 522string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 558string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/Existing", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 603var templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/ExistingWithRename", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 650string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 681string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectReference/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 713string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 752string templateLocation = _testAssetsManager.CopyTestAsset(templatePartLocation, testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 784string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectToSolution/BasicInSolutionRoot", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 820string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectToSolution/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 856string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectToSolution/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 892string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/AddProjectToSolution/BasicWithIndexes", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 931string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/Instructions/Basic", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 957string templateLocation = _testAssetsManager.CopyTestAsset("AddProjectReference", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 978string templateLocation = _testAssetsManager.CopyTestAsset("AddPackageReference", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path; 997string templateLocation = _testAssetsManager.CopyTestAsset("AddProjectToSolution", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path;
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
dotnet-watch.Tests (106)
Browser\BrowserTests.cs (1)
53var homePagePath = Path.Combine(testAsset.Path, "RazorApp", "Components", "Pages", "Home.razor");
Build\EvaluationTests.cs (3)
441.Path; 536var testDir = testAsset.Path; 597=> Path.Combine(projectAsset.Path, projectAsset.TestProject!.Name!, projectAsset.TestProject!.Name + ".csproj");
Build\FileSetSerializerTests.cs (1)
107var dir = _testAssetManager.CreateTestDirectory().Path;
CommandLine\LaunchSettingsTests.cs (2)
100UpdateSourceFile(Path.Combine(testAsset.Path, "Program.cs")); 123var directoryInfo = new DirectoryInfo(testAsset.Path);
CommandLine\ProgramTests.cs (5)
26TestOptions.GetEnvironmentOptions(workingDirectory: testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), 210var testFile = Path.Combine(testAsset.Path, "UnitTest1.cs"); 274var packagePath = Path.Combine(testAsset.Path, "bin", "Release", "WatchNoDepsApp.1.0.0.nupkg"); 343App.AssertOutputContains($"dotnet watch ❌ The project file could not be loaded. Could not find a part of the path '{Path.Combine(testAsset.Path, "AppWithDeps", "NonExistentDirectory", "X.csproj")}'"); 358testAsset.Path,
FileWatcher\FileWatcherTests.cs (10)
152var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 184var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 221var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 238var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 268var dir = _testAssetManager.CreateTestDirectory(identifier: $"{usePolling}{watchSubdirectories}").Path; 320var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 348var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 374var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 403var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path; 462var dir = _testAssetManager.CreateTestDirectory(usePolling.ToString()).Path;
HotReload\ApplyDeltaTests.cs (46)
20var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 55var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 80var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 87Path.Combine(testAsset.Path, "Directory.Build.props"), 121var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 123var buildFilePath = isDirectoryProps ? Path.Combine(testAsset.Path, "Directory.Build.props") : Path.Combine(dependencyDir, "Dependency.csproj"); 160var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 162var directoryBuildProps = Path.Combine(testAsset.Path, "Directory.Build.props"); 203var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 205var directoryBuildProps = Path.Combine(testAsset.Path, "Directory.Build.props"); 250var appDataDir = Path.Combine(testAsset.Path, "AppData", "dir"); 265await App.WaitUntilOutputContains($"dotnet watch ⌚ Ignoring change in excluded file '{appDataFilePath}': Add. Path matches DefaultItemExcludes glob 'AppData/**/*.*' set in '{testAsset.Path}'."); 288var binDir = Path.Combine(testAsset.Path, "bin", "Debug", ToolsetInfo.CurrentTargetFramework); 291var objDir = Path.Combine(testAsset.Path, "obj", "Debug", ToolsetInfo.CurrentTargetFramework); 316var programPath = Path.Combine(testAsset.Path, "Program.cs"); 317var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj"); 353var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj"); 354var logDir = Path.Combine(testAsset.Path, "logs"); 420var programPath = Path.Combine(testAsset.Path, "Program.cs"); 451var programPath = Path.Combine(testAsset.Path, "Program.cs"); 507var programPath = Path.Combine(testAsset.Path, "Program.cs"); 562var programPath = Path.Combine(testAsset.Path, "Program.cs"); 596var programPath = Path.Combine(testAsset.Path, "Program.cs"); 623UpdateSourceFile(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "<Updated>")); 648var sourcePath = Path.Combine(testAsset.Path, "Program.fs"); 693UpdateSourceFile(Path.Combine(testAsset.Path, "App", "Update.cs"), newSrc); 704var sourcePath = Path.Combine(testAsset.Path, "Program.cs"); 737var sourcePath = Path.Combine(testAsset.Path, "Program.cs"); 787var programPath = Path.Combine(testAsset.Path, "Program.cs"); 820var programPath = Path.Combine(testAsset.Path, "Program.cs"); 889UpdateSourceFile(Path.Combine(testAsset.Path, "Pages", "Index.razor"), newSource); 988var scopedCssPath = Path.Combine(testAsset.Path, "RazorClassLibrary", "Components", "Example.razor.css"); 1004var cssPath = Path.Combine(testAsset.Path, "RazorApp", "wwwroot", "app.css"); 1028WorkingDirectory = testAsset.Path, 1041var razorPath = Path.Combine(testAsset.Path, "Components", "Pages", "Home.razor"); 1052var cssPath = Path.Combine(testAsset.Path, "wwwroot", "css", "app.css"); 1088foreach (var depDll in Directory.GetFiles(testAsset.Path, "Dep2.dll", SearchOption.AllDirectories)) 1093File.WriteAllText(Path.Combine(testAsset.Path, "App", "Update.cs"), newSrc); 1108var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 1160var dependencyDir = Path.Combine(testAsset.Path, "Dependency"); 1215var serviceSourcePath = Path.Combine(testAsset.Path, "WatchAspire.ApiService", "Program.cs"); 1216var serviceProjectPath = Path.Combine(testAsset.Path, "WatchAspire.ApiService", "WatchAspire.ApiService.csproj"); 1219var webSourcePath = Path.Combine(testAsset.Path, "WatchAspire.Web", "Program.cs"); 1220var webProjectPath = Path.Combine(testAsset.Path, "WatchAspire.Web", "WatchAspire.Web.csproj"); 1316var webSourcePath = Path.Combine(testAsset.Path, "WatchAspire.Web", "Program.cs"); 1317var webProjectPath = Path.Combine(testAsset.Path, "WatchAspire.Web", "WatchAspire.Web.csproj");
HotReload\CompilationHandlerTests.cs (2)
14var workingDirectory = testAsset.Path; 15var hostDir = Path.Combine(testAsset.Path, "Host");
HotReload\RuntimeProcessLauncherTests.cs (25)
100var environmentOptions = TestOptions.GetEnvironmentOptions(workingDirectory ?? testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset); 153var workingDirectory = testAsset.Path; 154var hostDir = Path.Combine(testAsset.Path, "Host"); 156var serviceDirA = Path.Combine(testAsset.Path, "ServiceA"); 160var serviceDirB = Path.Combine(testAsset.Path, "ServiceB"); 162var libDir = Path.Combine(testAsset.Path, "Lib"); 318var workingDirectory = testAsset.Path; 319var hostDir = Path.Combine(testAsset.Path, "Host"); 321var serviceDirA = Path.Combine(testAsset.Path, "ServiceA"); 323var serviceDirB = Path.Combine(testAsset.Path, "ServiceB"); 325var libDir = Path.Combine(testAsset.Path, "Lib"); 412var workingDirectory = testAsset.Path; 413var hostDir = Path.Combine(testAsset.Path, "Host"); 416var libProject = Path.Combine(testAsset.Path, "Lib2", "Lib2.csproj"); 417var lib = Path.Combine(testAsset.Path, "Lib2", "Lib2.cs"); 501var workingDirectory = testAsset.Path; 502var hostDir = Path.Combine(testAsset.Path, "Host"); 504var serviceDirA = Path.Combine(testAsset.Path, "ServiceA"); 557var workingDirectory = testAsset.Path; 654var workingDirectory = testAsset.Path; 655var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj"); 656var programPath = Path.Combine(testAsset.Path, "Program.cs"); 708var appProjDir = Path.Combine(testAsset.Path, "AppWithDeps"); 770var projFilePath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj"); 771var programFilePath = Path.Combine(testAsset.Path, "Program.cs");
Process\LaunchSettingsProfileTest.cs (2)
84var projectPath = Path.Combine(project.Path, "Project1", "Project1.csproj"); 100=> Path.Combine(testAsset.Path, testAsset.TestProject.Name);
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
TestUtilities\TestOptions.cs (1)
32: asset.Path + ".hotreload";
TestUtilities\WatchableApp.cs (2)
160var projectDirectory = (relativeProjectDirectory != null) ? Path.Combine(asset.Path, relativeProjectDirectory) : asset.Path;
Watch\GlobbingAppTests.cs (3)
19operation(testAsset.Path); 82var changedFile = Path.Combine(testAsset.Path, "exclude", "Baz.cs"); 103testAsset.Path,
Watch\NoDepsAppTests.cs (2)
19UpdateSourceFile(Path.Combine(testAsset.Path, "Program.cs")); 44UpdateSourceFile(Path.Combine(testAsset.Path, "Program.cs"));
EndToEnd.Tests (28)
GivenDotNetUsesMSBuild.cs (7)
15string projectDirectory = _testAssetsManager.CreateTestDirectory().Path; 62NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 68var testProjectDirectory = testInstance.Path; 71.WithWorkingDirectory(testInstance.Path) 96NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 102var testProjectDirectory = testInstance.Path; 105.WithWorkingDirectory(testInstance.Path)
GivenNetFrameworkSupportsNetStandard2.cs (1)
15string projectDirectory = Path.Combine(_testInstance.Path, "TestApp");
GivenSelfContainedAppsRollForward.cs (2)
17string projectDirectory = directory.Path; 42string projectDirectory = directory.Path;
GivenWindowsApp.cs (2)
28var projectPath = Path.Combine(testInstance.Path, "consolecswinrt.csproj"); 57.WithWorkingDirectory(testInstance.Path)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
ProjectBuildTests.cs (15)
16string projectDirectory = directory.Path; 23string projectPath = Path.Combine(projectDirectory, new DirectoryInfo(directory.Path).Name + ".csproj"); 58string projectDirectory = directory.Path; 65string projectPath = Path.Combine(projectDirectory, new DirectoryInfo(directory.Path).Name + ".csproj"); 90string projectDirectory = directory.Path; 120selfContainedPublishDir.Should().HaveFilesMatching($"{new DirectoryInfo(directory.Path).Name}.dll", SearchOption.TopDirectoryOnly); 129string projectDirectory = directory.Path; 159selfContainedPublishDir.Should().HaveFilesMatching($"{new DirectoryInfo(directory.Path).Name}.dll", SearchOption.TopDirectoryOnly); 226string projectDirectory = directory.Path; 236var directoryInfo = new DirectoryInfo(directory.Path); 269string projectDirectory = directory.Path; 284var directoryInfo = new DirectoryInfo(directory.Path); 419string projectDirectory = directory.Path; 481new DirectoryInfo(directory.Path).Delete(true); 497string projectDirectory = directory.Path;
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.ApiCompat.IntegrationTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.ApiCompat.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.ApiCompatibility.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.ApiDiff.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.ApiSymbolExtensions.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.Cli.Utils.Tests (6)
DangerousFileDetectorTests.cs (3)
26var testFile = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, Path.GetRandomFileName()); 48var testFile = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, Path.GetRandomFileName()); 56var testFile = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, Path.GetRandomFileName());
GivenAppThrowingException.cs (2)
17.Path; 37.Path;
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.GenAPI.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.HotReload.Client.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.DotNet.MSBuildSdkResolver.Tests (1)
GivenAnMSBuildSdkResolver.cs (1)
645testName: callingMethod).Path);
Microsoft.DotNet.PackageInstall.Tests (26)
EndToEndToolTests.cs (18)
28var homeFolder = Path.Combine(testDirectory.Path, "home"); 32.WithWorkingDirectory(testDirectory.Path) 42.WithWorkingDirectory(testDirectory.Path) 61var homeFolder = Path.Combine(testDirectory.Path, "home"); 65.WithWorkingDirectory(testDirectory.Path) 75.WithWorkingDirectory(testDirectory.Path) 88var homeFolder = Path.Combine(testDirectory.Path, "home"); 92.WithWorkingDirectory(testDirectory.Path) 98.WithWorkingDirectory(testDirectory.Path) 104.WithWorkingDirectory(testDirectory.Path) 122var homeFolder = Path.Combine(testDirectory.Path, "home"); 126.WithWorkingDirectory(testDirectory.Path) 132.WithWorkingDirectory(testDirectory.Path) 138.WithWorkingDirectory(testDirectory.Path) 283var homeFolder = Path.Combine(testDirectory.Path, "home"); 287.WithWorkingDirectory(testDirectory.Path) 311var homeFolder = Path.Combine(testDirectory.Path, "home"); 315.WithWorkingDirectory(testDirectory.Path)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
TestToolBuilder.cs (1)
154var testAssetProjectDirectory = Path.Combine(testAsset.Path, testProject.Name!);
ToolPackageDownloaderTests.cs (3)
727var store = new ToolPackageStoreAndQuery(new DirectoryPath(root.Path)); 729var nugetConfigPath = new FilePath(Path.Combine(root.Path, "NuGet.config")); 877var root = new DirectoryPath(_testAssetsManager.CreateTestDirectory(callingMethod, identifier: useMock.ToString() + identiifer).Path);
ToolPackageInstallerNugetCacheTests.cs (2)
28string testDirectory = _testAssetsManager.CreateTestDirectory(identifier: testMockBehaviorIsInSync.ToString()).Path; 72string testDirectory = _testAssetsManager.CreateTestDirectory(identifier: testMockBehaviorIsInSync.ToString()).Path;
ToolPackageUninstallerTests.cs (1)
75var root = new DirectoryPath(_testAssetsManager.CreateTestDirectory(testName, identifier).Path);
Microsoft.DotNet.PackageValidation.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.Extensions.DotNetDeltaApplier.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Build.Containers.UnitTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Build.Extensions.Tasks.UnitTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Build.Tasks.UnitTests (7)
GivenAResolveRuntimePackAssetsTask.cs (1)
23var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
GivenAResolveTargetingPackAssetsTask.cs (1)
132mockPackageDirectory = _testAssetsManager.CreateTestDirectory(testName: testName).Path;
GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs (4)
22var testRoot = _testAssetsManager.CreateTestDirectory().Path; 55var testRoot = _testAssetsManager.CreateTestDirectory().Path; 90var testRoot = _testAssetsManager.CreateTestDirectory().Path; 359var testRoot = _testAssetsManager.CreateTestDirectory().Path;
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Build.Tests (143)
ArtifactsOutputPathTests.cs (53)
52File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), 64File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), 83.WithWorkingDirectory(testAsset.Path) 92OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject); 105.WithWorkingDirectory(testAsset.Path) 114OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject); 130.WithWorkingDirectory(testAsset.Path) 139OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject); 169.WithWorkingDirectory(testAsset.Path) 176var outputPathCalculator = OutputPathCalculator.FromProject(testAsset.Path, testProject); 178outputPathCalculator.ArtifactsPath = Path.Combine(testAsset.Path, testProject.Name, "artifacts"); 206new DirectoryInfo(OutputPathCalculator.FromProject(testAsset.Path, testProject).GetOutputDirectory()) 211File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """ 224new DirectoryInfo(OutputPathCalculator.FromProject(testAsset.Path, testProject).GetOutputDirectory()) 229File.Delete(Path.Combine(testAsset.Path, "Directory.Build.props")); 248File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """ 257File.WriteAllText(Path.Combine(testAsset.Path, "Directory.AfterTargetFrameworkInference.targets"), """ 271new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "bin", testProject.Name, "NET8_Debug")).Should().Exist(); 272new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "bin", testProject.Name, "NET7_Debug")).Should().Exist(); 273new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "bin", testProject.Name, "debug_netstandard2.0")).Should().Exist(); 275new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "bin", testProject.Name, "debug_net8.0")).Should().NotExist(); 276new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "bin", testProject.Name, "debug_net7.0")).Should().NotExist(); 278new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "obj", testProject.Name, "NET8_Debug")).Should().Exist(); 279new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "obj", testProject.Name, "NET7_Debug")).Should().Exist(); 280new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "obj", testProject.Name, "debug_netstandard2.0")).Should().Exist(); 282new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "obj", testProject.Name, "debug_net8.0")).Should().NotExist(); 283new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "obj", testProject.Name, "debug_net7.0")).Should().NotExist(); 288.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name)) 295new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "publish", testProject.Name, "NET8_Release")).Should().Exist(); 296new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "publish", testProject.Name, "NET7_Debug")).Should().Exist(); 297new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "publish", testProject.Name, "debug_netstandard2.0")).Should().Exist(); 300.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name)) 305new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "package", "release")).Should().Exist(); 306new FileInfo(Path.Combine(testAsset.Path, "artifacts", "package", "release", testProject.Name + ".1.0.0.nupkg")).Should().Exist(); 319File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), 335var artifactsFolder = _testAssetsManager.CreateTestDirectory(identifier: "ArtifactsPath").Path; 361new FileInfo(Path.Combine(testAsset.Path, "artifacts", "binaries", "App", "debug", "App.dll")) 372.WithWorkingDirectory(testAsset.Path) 377new FileInfo(Path.Combine(testAsset.Path, "artifacts", "published_app", "App", "release", "App.dll")) 388.WithWorkingDirectory(testAsset.Path) 393new FileInfo(Path.Combine(testAsset.Path, "artifacts", "package_output", "release", "App.1.0.0.nupkg")) 404.WithWorkingDirectory(testAsset.Path) 409new FileInfo(Path.Combine(testAsset.Path, "artifacts", "bin", "Apps", "MyApp", "debug", "App.dll")) 428File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), 511new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "MSBuildSdk", ToolsetInfo.CurrentTargetFramework)) 518new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "PackageReference", ToolsetInfo.CurrentTargetFramework)) 524new DirectoryInfo(Path.Combine(testAsset.Path, "artifacts", "PackageReference", ToolsetInfo.CurrentTargetFramework)) 530new FileInfo(Path.Combine(testAsset.Path, "MSBuildSdk", "bin", "Debug", ToolsetInfo.CurrentTargetFramework, "MSBuildSdk.dll")).Should().Exist(); 531new FileInfo(Path.Combine(testAsset.Path, "MSBuildSdk", "obj", "Debug", ToolsetInfo.CurrentTargetFramework, "MSBuildSdk.dll")).Should().Exist(); 552File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """ 560var projectDir = Path.Combine(testAsset.Path, testAsset.TestProject.Name); 574var outputDir = new DirectoryInfo(OutputPathCalculator.FromProject(testAsset.Path, testProject).GetOutputDirectory(configuration: "release")); 578var publishDir = new DirectoryInfo(OutputPathCalculator.FromProject(testAsset.Path, testProject).GetPublishDirectory(configuration: "release"));
EvaluatorFastPathTests.cs (3)
22.WithWorkingDirectory(testAsset.Path); 28var logPath = Path.Combine(testAsset.Path, "PropertyFunctionsRequiringReflection"); 37var testDir = _testAssetsManager.CreateTestDirectory().Path;
GivenFrameworkReferences.cs (1)
1160var command = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProject.Name), targetFramework,
GivenThatWeHaveAPackageReferenceWithAliases.cs (3)
49.WithWorkingDirectory(testAsset.Path); 94.WithWorkingDirectory(testAsset.Path); 131.WithWorkingDirectory(testAsset.Path);
GivenThatWeWantToBuildADesktopLibrary.cs (1)
427string projectFolder = Path.Combine(testAsset.Path, project.Name);
GivenThatWeWantToBuildALibrary.cs (5)
542var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name)); 687var relativePathToSln = Path.GetFileName(testAsset.Path) + ".sln"; 837Path.Combine(asset.Path, project.Name), 1033File.WriteAllText(Path.Combine(testAsset.Path, testProject.Name, $"{testProject.Name}.cs"), @" 1045string projectFolder = Path.Combine(testAsset.Path, testProject.Name);
GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs (1)
152var buildCommand = new DotnetBuildCommand(Log, Path.Combine(testAsset.Path, "Project", "Project.csproj"));
GivenThatWeWantToBuildANetCoreApp.cs (1)
1123var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
GivenThatWeWantToBuildASelfContainedApp.cs (3)
398.WithWorkingDirectory(Path.Combine(testAsset.Path, "MainProject")) 431.WithWorkingDirectory(testAsset.Path) 495Path.Combine(asset.Path, project.Name),
GivenThatWeWantToBuildAWindowsDesktopProject.cs (6)
148var testDirectory = _testAssetsManager.CreateTestDirectory().Path; 257.WithWorkingDirectory(testDir.Path) 262var projectPath = Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj"); 281File.WriteAllText(Path.Combine(testDir.Path, "Directory.Build.targets"), DirectoryBuildTargetsContent); 283var buildCommand = new BuildCommand(Log, testDir.Path);
GivenThatWeWantToBuildAWindowsRuntimeComponent.cs (1)
262PackagesDirectory = Path.Combine(testAsset.Path, "packages")
GivenThatWeWantToBuildWithATargetPlatform.cs (3)
32var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName); 70var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, "TargetPlatformIdentifier"); 88var build = new BuildCommand(Log, Path.Combine(testAsset.Path, testProject.Name));
GivenThatWeWantToBuildWithGlobalJson.cs (1)
27var globalJsonPath = Path.Combine(testAsset.Path, testProject.Name, "global.json");
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (1)
855buildCommand.WithWorkingDirectory(testAsset.Path)
GivenThatWeWantToProduceReferenceAssembly.cs (1)
29var filePath = Path.Combine(testAsset.Path, testProject.Name, "obj", "Debug", targetFramework, "ref", $"{testProject.Name}.dll");
GivenThatWeWantToReferenceAProject.cs (9)
169File.WriteAllText(Path.Combine(childAsset.Path, childProject.Name, contentName), childProject.Name); 181.WithProjectChanges(project => AddProjectChanges(project, Path.Combine(childAsset.Path, childProject.Name, childProject.Name + ".csproj"))); 182File.WriteAllText(Path.Combine(parentAsset.Path, parentProject.Name, contentName), parentProject.Name); 187var getValuesCommand = new GetValuesCommand(Log, Path.Combine(parentAsset.Path, parentProject.Name), tfm, "ResultOutput") 197valuesResult.Should().BeEquivalentTo(Path.GetFullPath(Path.Combine(parentAsset.Path, parentProject.Name, contentName)), 198Path.GetFullPath(Path.Combine(childAsset.Path, childProject.Name, contentName))); 203valuesResult.First().Should().Contain(Path.GetFullPath(Path.Combine(parentAsset.Path, parentProject.Name, contentName))); 269File.WriteAllText(Path.Combine(testAsset.Path, testProjectA.Name, "a.txt"), "A"); 277var contentPath = Path.Combine(testProjectC.GetOutputDirectory(testAsset.Path), "a.txt");
GivenThatWeWantToSetPropertiesInDirectoryBuildProps.cs (2)
23string directoryBuildPropsPath = Path.Combine(testAsset.Path, "Directory.Build.props"); 42string projectFolder = Path.Combine(testAsset.Path, project.Name);
GivenThatWeWantToUseAnalyzers.cs (8)
112asset.Path, 118.WithWorkingDirectory(asset.Path) 140asset.Path, 146.WithWorkingDirectory(asset.Path) 207Path.Combine(asset.Path, "NonWebAppWithAspNet"), 213.WithWorkingDirectory(asset.Path) 249Path.Combine(asset.Path, "TestApp"), 255.WithWorkingDirectory(asset.Path)
GivenThatWeWantToUseVB.cs (1)
178var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
GivenTransitiveFrameworkReferencesAreDisabled.cs (3)
32string nugetPackagesFolder = _testAssetsManager.CreateTestDirectory(testName, identifier: "packages_" + referenceAspNet).Path; 110string nugetPackagesFolder = _testAssetsManager.CreateTestDirectory(identifier: "packages").Path; 155string nugetPackagesFolder = _testAssetsManager.CreateTestDirectory(identifier: "packages").Path;
GiventThatWeWantDesignerSupport.cs (1)
69Path.Combine(asset.Path, project.Name),
GivenWeWantToRequireWindowsForDesktopApps.cs (8)
151new BuildCommand(Log, testInstance.Path) 178var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName)); 206var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName)); 237var buildCommand = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName)); 264Path.Combine(asset.Path, testProject.Name), 292Path.Combine(asset.Path, testProject.Name), 306FullAssetPath = Path.GetFullPath(Path.Combine(asset.Path, testProject.Name, item.metadata["OutputPath"])) 360Path.Combine(testAsset.Path, testProject.Name),
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
ProjectConfigurationDescriptionTest.cs (2)
26File.WriteAllText(Path.Combine(testAsset.Path, testProj.Name, $"{testProj.Name}.cs"), @" 41var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
ReferenceExeTests.cs (4)
402var mtpProjectDirectory = Path.Combine(testAssetMTP.Path, "MTPTestProject"); 462var consoleAppDirectory = Path.Combine(testAssetSelfContained.Path, testConsoleProjectSelfContained.Name); 500string consoleProjectDirectory = Path.Combine(testAsset.Path, testConsoleProject.Name); 535var mtpProjectDirectory = Path.Combine(testAssetMTP.Path, mtpSelfContained.Name);
RoslynBuildTaskTests.cs (1)
136buildCommand.WithWorkingDirectory(testAsset.Path)
SourceLinkTests.cs (19)
124CreateGitFiles(testAsset.Path, originUrl: null, commitSha: null); 143CreateGitFiles(testAsset.Path, originUrl: null); 159CreateGitFiles(testAsset.Path, originUrl: "https://contoso.com"); 163WorkingDirectory = testAsset.Path 191CreateGitFiles(testAsset.Path, origin); 195WorkingDirectory = testAsset.Path 205var expectedPattern = Path.Combine(testAsset.Path, "*").Replace("\\", "\\\\"); 240CreateGitFiles(testAsset.Path, "https://github.com/org/repo"); 244WorkingDirectory = testAsset.Path 274CreateGitFiles(testAsset.Path, "https://github.com/org/repo"); 278WorkingDirectory = testAsset.Path 300var intDir = Path.Combine(testAsset.Path, "NETCoreCppCliTest", "IntDir"); 306CreateGitFiles(testAsset.Path, "https://github.com/org/repo"); 310WorkingDirectory = testAsset.Path 317var expectedPattern = Path.Combine(testAsset.Path, "*").Replace("\\", "\\\\"); 321var outputDir = Path.Combine(testAsset.Path, "NETCoreCppCliTest", "x64", "Debug"); 333CreateGitFiles(testAsset.Path, "https://github.com/org/repo"); 337WorkingDirectory = Path.Combine(testAsset.Path, "FxWpf") 342Assert.True(File.Exists(Path.Combine(testAsset.Path, "obj", "net472", "MainWindow.g.cs")));
Microsoft.NET.Clean.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Pack.Tests (10)
GivenThatWeWantToPackAHelloWorldProject.cs (7)
87File.WriteAllText(Path.Combine(helloWorldAsset.Path, "Directory.Build.props"), "<Project><PropertyGroup><PackRelease>true</PackRelease></PropertyGroup></Project>"); 97var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", optedOut ? "Debug" : "Release", "HelloWorld.1.0.0.nupkg"); 123var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", valueOfPackRelease == "true" ? "Release" : "Debug", "HelloWorld.1.0.0.nupkg"); 155var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", expectedConfiguration, "HelloWorld.1.0.0.nupkg"); 168File.WriteAllText(helloWorldAsset.Path + "/Directory.Build.props", "<Project><PropertyGroup><PackRelease>false</PackRelease></PropertyGroup></Project>"); 177var unexpectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Debug", tfm, "HelloWorld.dll"); 179var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release", tfm, "HelloWorld.dll");
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
SolutionPackTests.cs (2)
29string packageOutputPath = Path.Combine(testAsset.Path, "output", "packages"); 32.WithWorkingDirectory(testAsset.Path)
Microsoft.NET.Publish.Tests (84)
FilesCopiedToPublishDirTests.cs (1)
56Path.Combine(testAsset.Path, testProject.Name),
GivenThatWeWantToPublishAHelloWorldProject.cs (17)
435File.WriteAllText(Path.Combine(helloWorldAsset.Path, "Directory.Build.props"), "<Project><PropertyGroup><PublishRelease>true</PublishRelease></PropertyGroup></Project>"); 443var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", optedOut ? "Debug" : "Release", ToolsetInfo.CurrentTargetFramework, "HelloWorld.dll"); 465var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Debug", ToolsetInfo.CurrentTargetFramework, "HelloWorld.dll"); 467var releaseAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release", ToolsetInfo.CurrentTargetFramework, "HelloWorld.dll"); 478.Path; 497.Path; 515.Path; 566var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release", ToolsetInfo.CurrentTargetFramework, "HelloWorld.dll"); 597var expectedAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Debug", tfm, "HelloWorld.dll"); 599var releaseAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release", tfm, "HelloWorld.dll"); 675var publishProfilesDirectory = Path.Combine(helloWorldAsset.Path, "Properties", "PublishProfiles"); 687var publishCommand = new DotnetPublishCommand(Log, helloWorldAsset.Path); 693var releaseAssetPath = Path.Combine(helloWorldAsset.Path, "bin", "Release", ToolsetInfo.CurrentTargetFramework, rid, "HelloWorld.dll"); 862var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name); 945var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name); 992var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name); 1049var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
GivenThatWeWantToPublishAProjectWithDependencies.cs (2)
119string filterProjDir = _testAssetsManager.CopyTestAsset("StoreManifests").WithSource().Path; 168string filterProjDir = _testAssetsManager.CopyTestAsset("StoreManifests").WithSource().Path;
GivenThatWeWantToPublishAToolProject.cs (1)
59publishCommand.WithWorkingDirectory(testAsset.Path).Execute($"-bl:{binlogDestPath}");
GivenThatWeWantToPublishAWebApp.cs (1)
185var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
GivenThatWeWantToPublishIncrementally.cs (5)
115var publishCommand = new PublishCommand(testAsset).WithWorkingDirectory(testAsset.Path) as PublishCommand; 186.WithWorkingDirectory(testDir.Path) 197new PublishCommand(Log, Path.Combine(testDir.Path, assetName)) 201var publishDir = Path.Combine(Directory.GetDirectories(Path.Combine(testDir.Path, assetName, "bin", "Debug")).FirstOrDefault(), runtimeId, "publish"); 208new PublishCommand(Log, Path.Combine(testDir.Path, assetName))
GivenThatWeWantToPublishReadyToRun.cs (1)
258var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name));
GivenThatWeWantToPublishToClickOnce.cs (1)
35var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (18)
121.WithWorkingDirectory(testDir.Path) 126var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 134string mainWindowXamlCsPath = Path.Combine(testDir.Path, "Form1.cs"); 142var restoreCommand = new RestoreCommand(Log, testDir.Path); 147var publishCommand = new PublishCommand(Log, testDir.Path); 153var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 172FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe") 193.WithWorkingDirectory(testDir.Path) 198var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 206string mainWindowXamlCsPath = Path.Combine(testDir.Path, "MainWindow.xaml.cs"); 214var restoreCommand = new RestoreCommand(Log, testDir.Path); 219var publishCommand = new PublishCommand(Log, testDir.Path); 225var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 244FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
GivenThatWeWantToStoreAProjectWithDependencies.cs (1)
136WorkingDirectory = simpleDependenciesAsset.Path
GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs (21)
86.Execute(args.Append(testAsset.Path)) 93finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, expectedTfm, expectedConfiguration)); 108.Execute(testAsset.Path) 115finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, "net8.0", expectedConfiguration)); 132.Execute(testAsset.Path) 139finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, testProject == testProjects[0] ? firstProjectTfm : secondProjectTfm, expectedConfiguration)); 157.Execute(passDashF ? "-f" : "", args, testAsset.Path) 164finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, expectedTfm, expectedConfiguration)); 181.Execute(testAsset.Path) 188finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, testProject == testProjects[0] ? firstProjectTfm : secondProjectTfm, expectedConfiguration)); 219.Execute("pack", testAsset.Path) 227.Execute(property == PublishRelease ? "publish" : "pack", testAsset.Path) 234finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, testProject == testProjects[0] ? firstProjectTfm : secondProjectTfm, expectedConfiguration)); 255.Execute(testAsset.Path) 272.Execute(testAsset.Path) 289.Execute(testAsset.Path) 305.Execute("dotnet", pReleaseVar == PublishRelease ? "publish" : "pack", testAsset.Path) 319.WithWorkingDirectory(Directory.GetParent(testAsset.Path).FullName) // code under test looks in CWD, ensure coverage outside this scenario 320.Execute(testAsset.Path) 336.Execute(testAsset.Path) // This property won't be set in VS, make sure the error doesn't occur because of this by mimicking behavior. 343finalPropertyResults.Add(testProject.GetPropertyValues(testAsset.Path, tfm, expectedConfiguration));
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
PublishDepsFilePathTests.cs (2)
20var projectPath = Path.Combine(testAsset.Path, testProject.Name); 42var projectPath = Path.Combine(testAsset.Path, testProject.Name);
PublishItemsOutputGroupOutputsTests.cs (2)
56Path.Combine(testAsset.Path, testProject.Name), 70OutputPath = Path.GetFileName(Path.GetFullPath(Path.Combine(testAsset.Path, testProject.Name, item.metadata["OutputPath"])))
PublishItemsOutputGroupTests.cs (1)
40Path.Combine(testAsset.Path, testProject.Name),
PublishWpfApp.cs (9)
21.WithWorkingDirectory(testDir.Path) 26var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 34string mainWindowXamlCsPath = Path.Combine(testDir.Path, "MainWindow.xaml.cs"); 42var restoreCommand = new RestoreCommand(Log, testDir.Path); 47var publishCommand = new PublishCommand(Log, testDir.Path); 53var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory( 59FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
Microsoft.NET.Rebuild.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Restore.Tests (18)
GivenThatWeWantAutomaticTargetingPackReferences.cs (4)
37testAsset.Path, 90testAsset.Path, 157testAsset.Path, 199testAsset.Path,
GivenThatWeWantRestoreToUseImplicitPackages.cs (2)
32testAsset.Path, 66testAsset.Path,
GivenThatWeWantToUseFrameworkRoslyn.cs (10)
29NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 31var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); 68NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 70var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); 125var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); 156NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 158var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); 179NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 183WorkingDirectory = Path.Combine(testAsset.Path, "FxWpf") 191Assert.True(File.Exists(Path.Combine(testAsset.Path, "obj", "net472", "MainWindow.g.cs")));
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
RestoreWithOlderNuGet.cs (1)
24var restoreCommand = new NuGetExeRestoreCommand(Log, testAsset.Path, testProject.Name)
Microsoft.Net.Sdk.AnalyzerRedirecting.Tests (6)
SdkAnalyzerAssemblyRedirectorTests.cs (6)
20var vsDir = Path.Combine(testDir.Path, "vs"); 23var sdkAnalyzerPath = FakeDll(testDir.Path, @$"sdk\packs\Microsoft.AspNetCore.App.Ref\{b}\analyzers\dotnet\cs", "Microsoft.AspNetCore.App.Analyzers"); 35var vsDir = Path.Combine(testDir.Path, "vs"); 38var sdkAnalyzerPath = FakeDll(testDir.Path, @"sdk\packs\Microsoft.AspNetCore.App.Ref\9.0.0-preview.7.24406.2\analyzers\dotnet\vb", "Microsoft.AspNetCore.App.Analyzers"); 56var vsDir = Path.Combine(testDir.Path, "vs"); 59var sdkAnalyzerPath = FakeDll(testDir.Path, @$"sdk\packs\Microsoft.AspNetCore.App.Ref\{b}\analyzers\dotnet\cs", "Microsoft.AspNetCore.App.Analyzers");
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (12)
AspNetSdkBaselineTest.cs (2)
289ProjectDirectory.Path, 297var template = Templatize(actual, ProjectDirectory.Path, GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, runtimeIdentifier);
BlazorLegacyIntegrationTest50.cs (3)
24var clientBuildOutputDirectory = Path.Combine(testInstance.Path, "Client", "bin", "Debug", targetFramework); 33var serverBuildOutputDirectory = Path.Combine(testInstance.Path, "Server", "bin", "Debug", targetFramework); 39var serverIntermediateDirectory = Path.Combine(testInstance.Path, "Server", "obj", "Debug", targetFramework, "staticwebassets");
BlazorLegacyIntegrationTest60.cs (2)
32var clientBuildOutputDirectory = Path.Combine(testInstance.Path, "Client", "bin", "Debug", targetFramework); 41var serverBuildOutputDirectory = Path.Combine(testInstance.Path, "Server", "bin", "Debug", targetFramework);
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
VanillaWasmTests.cs (1)
29var buildOutputDirectory = Path.Combine(testInstance.Path, "bin", "Debug", targetFramework);
WasmBuildIntegrationTest.cs (2)
684File.WriteAllText(Path.Combine(testInstance.Path, "razorclasslibrary", "TestReference.cs"), 764File.WriteAllText(Path.Combine(testInstance.Path, "blazorwasm", "TestReference.cs"),
WasmPublishIntegrationTest.cs (1)
1599File.WriteAllText(Path.Combine(testInstance.Path, "razorclasslibrary", "TestReference.cs"),
Microsoft.NET.Sdk.Publish.Tasks.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Sdk.Razor.Tests (22)
BuildIncrementalismTest.cs (4)
22var indexPage = Path.Combine(projectDirectory.Path, "Views", "Home", "Index.cshtml"); 86var page = Path.Combine(projectDirectory.Path, "Views", "Shared", "NavMenu.razor"); 113Directory.Delete(Path.Combine(projectDirectory.Path, "Components"), recursive: true); 148File.AppendAllText(Path.Combine(projectDirectory.Path, "Views", "_ViewImports.cshtml"), Environment.NewLine);
BuildIntegrationTest.cs (3)
33.And.NotHaveStdOutContaining($"SimpleMvc -> {Path.Combine(projectDirectory.Path, outputPath, "SimpleMvc.Views.dll")}"); 64var filePath = Path.Combine(projectDirectory.Path, "Views", "Home", "Index.cshtml"); 215var class2Path = Path.Combine(projectDirectory.Path, "AnotherClassLib", "Class2.cs");
BuildIntrospectionTest.cs (2)
102var build = new MSBuildCommand(Log, "_IntrospectWatchItems", projectDirectory.Path); 118var build = new MSBuildCommand(Log, "_IntrospectRazorGenerateComponentDesignTime", projectDirectory.Path);
BuildWithComponentsIntegrationTest.cs (1)
68var projectFile = Path.Combine(projectDirectory.Path, "ComponentApp.csproj");
DesignTimeBuildIntegrationTest.cs (3)
20var command = new MSBuildCommand(Log, "Compile", projectDirectory.Path); 42var command = new MSBuildCommand(Log, "RazorGenerateDesignTime;_IntrospectRazorGenerateWithTargetPath", projectDirectory.Path); 73var command = new MSBuildCommand(Log, "RazorGenerateComponentDesignTime;_IntrospectRazorComponentWithTargetPath", projectDirectory.Path);
MvcBuildIntegrationTest50.cs (2)
22var indexPage = Path.Combine(projectDirectory.Path, "Views", "Shared", "NavMenu.razor"); 95var scopedCssPath = Path.Combine(project.Path, "wwwroot", "Views", "Home", "Index.cshtml.css");
PackIntegrationTest.cs (4)
33Path.Combine(projectDirectory.Path, "obj", "Debug", "ClassLibrary.1.0.0.nuspec"), 38Path.Combine(projectDirectory.Path, "obj", "Debug", "ClassLibrary.1.0.0.nuspec"), 43Path.Combine(projectDirectory.Path, "obj", "Debug", "ClassLibrary.1.0.0.nuspec"), 48Path.Combine(projectDirectory.Path, "obj", "Debug", "ClassLibrary.1.0.0.nuspec"),
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
PublishIntegrationTest.cs (2)
54var outputPath = Path.Combine(projectDirectory.Path, "bin", "Debug", DefaultTfm); 71Directory.Delete(Path.Combine(projectDirectory.Path, "Views"), recursive: true);
Microsoft.NET.Sdk.Razor.Tool.Tests (35)
DefaultExtensionAssemblyLoaderTest.cs (15)
17var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 19var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 33var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 34var alphaFilePath2 = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha2.dll"); 36var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 53var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 54var alphaFilePath2 = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha2.dll"); 56var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 72var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 74var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 89var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 90var betaFilePath = LoaderTestResources.Beta.WriteToFile(directory.Path, "Beta.dll"); 91var gammaFilePath = LoaderTestResources.Gamma.WriteToFile(directory.Path, "Gamma.dll"); 92var deltaFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 94var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow"));
DefaultExtensionDependencyCheckerTest.cs (14)
19var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 21var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 38var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 39var betaFilePath = LoaderTestResources.Beta.WriteToFile(directory.Path, "Beta.dll"); 40var gammaFilePath = LoaderTestResources.Gamma.WriteToFile(directory.Path, "Gamma.dll"); 41var deltaFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 43var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 62var alphaFilePath = LoaderTestResources.Beta.WriteToFile(directory.Path, "Alpha.dll"); 63var betaFilePath = LoaderTestResources.Beta.WriteToFile(directory.Path, "Beta.dll"); 64var gammaFilePath = LoaderTestResources.Gamma.WriteToFile(directory.Path, "Gamma.dll"); 65var deltaFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 67var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.Path, "shadow")); 72LoaderTestResources.Alpha.WriteToFile(directory.Path, "Alpha.dll"); 88var deltaFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll");
MetadataCacheTest.cs (5)
16var assemblyFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 32var assemblyFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 55var assemblyFilePath1 = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll"); 56var assemblyFilePath2 = LoaderTestResources.Gamma.WriteToFile(directory.Path, "Gamma.dll"); 73var assemblyFilePath = LoaderTestResources.Delta.WriteToFile(directory.Path, "Delta.dll");
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Sdk.StaticWebAssets.Tests (198)
AspNetSdkBaselineTest.cs (2)
289ProjectDirectory.Path, 297var template = Templatize(actual, ProjectDirectory.Path, GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, runtimeIdentifier);
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
ScopedCssIntegrationTests.cs (12)
82var stylesFolder = Path.Combine(projectDirectory.Path, "Styles", "Pages"); 85File.Move(Path.Combine(projectDirectory.Path, "Components", "Pages", "Counter.razor.css"), styles); 277File.Delete(Path.Combine(projectDirectory.Path, "Components", "Pages", "Counter.razor.css")); 278File.Delete(Path.Combine(projectDirectory.Path, "Components", "Pages", "Index.razor.css")); 327File.Delete(Path.Combine(projectDirectory.Path, "Components", "Pages", "Counter.razor.css")); 348File.Delete(Path.Combine(projectDirectory.Path, "Components", "Pages", "Counter.razor.css")); 349File.Delete(Path.Combine(projectDirectory.Path, "Components", "Pages", "Index.razor.css")); 591var scopedCssFile = Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "Index.razor.css"); 593File.WriteAllText(Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "Index.razor"), "This is a test razor component."); 629var originalLibPath = Path.Combine(ProjectDirectory.Path, "AnotherClassLib"); 630var newLibPath = Path.Combine(ProjectDirectory.Path, "项目"); 651var mainProjectFile = Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "AppWithPackageAndP2PReference.csproj");
StaticWebAssetsCompressionIntegrationTest.cs (6)
21var file = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js"); 22var gzipFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.gz"); 23var brotliFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.br"); 136var file = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js"); 137var gzipFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.gz"); 138var brotliFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.br");
StaticWebAssetsDesignTimeTest.cs (7)
33File.WriteAllText(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "file.js"), "New File"); 47inputFiles.Should().Contain(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "file.js")); 48inputFiles.Should().Contain(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js")); 49inputFiles.Should().Contain(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.v4.js")); 69File.Delete(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js")); 84inputFiles.Should().Contain(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.v4.js")); 117inputFiles.Should().Contain(Path.Combine(ProjectDirectory.Path, "ClassLibrary", "obj", "Debug", DefaultTfm, "staticwebassets.build.json"));
StaticWebAssetsFingerprintingTest.cs (2)
26Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "wwwroot", "css")); 27File.WriteAllText(Path.Combine(ProjectDirectory.Path, "wwwroot", "css", "fingerprint-site.css"), "body { color: red; }");
StaticWebAssetsIntegrationTest.cs (10)
161Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "wwwroot")); 162File.WriteAllText(Path.Combine(ProjectDirectory.Path, "wwwroot", "index.html"), "some html"); 458var clean = new CleanCommand(Log, ProjectDirectory.Path); 596Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "wwwroot")); 597File.WriteAllText(Path.Combine(ProjectDirectory.Path, "wwwroot", "file.build.txt"), "file1"); 598File.WriteAllText(Path.Combine(ProjectDirectory.Path, "wwwroot", "file.publish.txt"), "file1"); 631Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "wwwroot", "_content", "ClassLibrary", "js")); 632File.WriteAllText(Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "wwwroot", "_content", "ClassLibrary", "js", "project-transitive-dep.js"), "console.log('transitive-dep');"); 948var intermediateOutputPath = Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "obj", "Debug"); 949var publishPath = Path.Combine(ProjectDirectory.Path, "AppWithPackageAndP2PReference", "bin", "Debug", "publish");
StaticWebAssetsPackIntegrationTest.cs (158)
30Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "bundle", "js")); 31File.WriteAllText(Path.Combine(projectDirectory.Path, "bundle", "js", "pkg-direct-dep.js"), "console.log('bundle');"); 117Path.Combine(projectDirectory.Path, "bin", "Debug", "PackageLibraryNoStaticAssets.1.0.0.nupkg"), 168File.WriteAllText(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "wwwroot", "LICENSE"), "license file contents"); 210Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 222Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 250Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 265Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 293Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 308Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 334Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 346Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 374Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 386Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 421Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 428Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 429File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 430File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 431File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 432File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 433File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 434File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 446projectDirectory.Path, 490Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 497Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 498File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 499File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 500File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 501File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 502File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 503File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 515projectDirectory.Path, 558Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 565Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 566File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 567File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 568File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 569File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 570File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 571File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 588projectDirectory.Path, 632Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 639Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 640File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 641File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 642File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 643File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 644File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 645File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 662projectDirectory.Path, 705Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 712Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 713File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 714File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 715File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 716File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 717File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 718File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 730projectDirectory.Path, 774Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 781Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 782File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 783File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 784File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 785File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 786File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 787File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 799projectDirectory.Path, 840Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 847Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 848File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 849File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 850File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 851File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 852File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 853File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 865projectDirectory.Path, 907Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 914Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 915File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 916File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 917File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 918File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 919File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 920File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 932projectDirectory.Path, 973Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 980Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 981File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 982File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 983File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 984File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 985File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 986File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1003projectDirectory.Path, 1045Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1052Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1053File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1054File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1055File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1056File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1057File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1058File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1075projectDirectory.Path, 1116Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1123Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1124File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1125File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1126File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1127File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1128File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1129File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1141projectDirectory.Path, 1183Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1190Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1191File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1192File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1193File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1194File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1195File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1196File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1208projectDirectory.Path, 1253Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1260Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1261File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1262File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1263File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1264File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.js"), ""); 1265File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1266File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1267File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "PackageLibraryTransitiveDependency.lib.module.js"), ""); 1268File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1280projectDirectory.Path, 1328Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1335Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1336File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1337File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1338File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1339File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.js"), ""); 1340File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1341File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1342File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "PackageLibraryTransitiveDependency.lib.module.js"), ""); 1343File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1357projectDirectory.Path, 1405Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true); 1412Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot")); 1413File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1414File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText); 1415File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), ""); 1416File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), ""); 1417File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "background.png"), ""); 1418File.WriteAllText(Path.Combine(projectDirectory.Path, "wwwroot", "exampleJsInterop.js"), ""); 1430projectDirectory.Path, 1460Directory.Delete(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "Components"), recursive: true); 1472Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "bin", "Debug", "PackageLibraryDirectDependency.1.0.0.nupkg"), 1612Path.Combine(projectDirectory.Path, "bin", "Debug", "ComponentLibrary.1.0.0.nupkg"), 1675File.WriteAllText(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "wwwroot", "LICENSE"), "license file contents"); 1706File.WriteAllText(Path.Combine(projectDirectory.Path, "PackageLibraryDirectDependency", "wwwroot", "LICENSE"), "license file contents");
Microsoft.NET.Sdk.Web.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (5)
ManifestReaderFunctionalTests.cs (1)
88var testFolder = _testAssetsManager.CreateTestDirectory().Path;
ManifestTests.cs (2)
94var testDirectory = _testAssetsManager.CreateTestDirectory(identifier: defaultExists.ToString() + "_" + additionalExists.ToString()).Path; 126var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
SdkDirectoryWorkloadManifestProviderTests.cs (2)
27_testDirectory = _testAssetsManager.CreateTestDirectory(testName, identifier).Path; 1331var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
Microsoft.NET.TestFramework (9)
AspNetSdkTest.cs (2)
65File.Copy(assetPath, Path.Combine(projectDirectory.Path, Path.GetFileName(assetPath))); 109var rebuild = new RebuildCommand(Log, asset.Path, relativePathToProject);
Commands\DotnetBuildCommand.cs (1)
35var projectPath = Path.Combine(TestAsset.Path, TestAsset.TestProject.Name);
ProjectConstruction\TestProject.cs (1)
131string targetFolder = Path.Combine(targetTestAsset.Path, Name ?? string.Empty);
TestAsset.cs (4)
16public string TestRoot => Path; 52var files = Directory.GetFiles(Path, "*.*", SearchOption.AllDirectories); 76Directory.CreateDirectory(sourceDir.Replace(_testAssetRoot ?? string.Empty, Path)); 87string destFile = srcFile.Replace(_testAssetRoot ?? string.Empty, Path);
TestDirectory.cs (1)
17EnsureExistsAndEmpty(Path, sdkVersion);
Microsoft.NET.ToolPack.Tests (4)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (3)
261var buildCommand = new BuildCommand(testAsset).WithWorkingDirectory(testAsset.Path); 264var packCommand = new PackCommand(testAsset).WithWorkingDirectory(testAsset.Path) as PackCommand; 400var packCommand = new PackCommand(Log, Path.Combine(asset.Path, testProject.Name));
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.TemplateEngine.Cli.UnitTests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.WebTools.AspireService.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
Microsoft.Win32.Msi.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
msbuild.Integration.Tests (7)
GivenDotnetInvokesMSBuild.cs (6)
25.WithWorkingDirectory(testInstance.Path) 41.WithWorkingDirectory(testInstance.Path) 62.WithWorkingDirectory(testInstance.Path) 79.WithWorkingDirectory(testInstance.Path) 93.WithWorkingDirectory(testInstance.Path) 106.WithWorkingDirectory(testInstance.Path)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
sdk-tasks.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
System.CommandLine.StaticCompletions.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;
trustedroots.Tests (1)
Program.cs (1)
72command.WorkingDirectory = testDirectory.Path;