489 references to TestRoot
dotnet.Tests (17)
CommandTests\Build\GivenDotnetBuildBuildsCsproj.cs (2)
278new DotnetBuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name ?? string.Empty)) 287var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework);
CommandTests\BuildServer\Shutdown\BuildServerShutdownCommandTests.cs (1)
184.WithWorkingDirectory(testInstance.TestRoot)
CommandTests\Package\Add\GivenDotnetPackageAdd.cs (2)
66.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 96.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name))
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (1)
188var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: targetFramework);
CommandTests\Restore\GivenThatIWantToRestoreApp.cs (2)
67var rootPath = Path.Combine(testAsset.TestRoot, testProject.Name); 197var rootPath = Path.Combine(testAsset.TestRoot, testProject.Name);
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs (1)
112MicrosoftTestingPlatformOptions.TestModulesRootDirectoryOption.Name, testInstance.TestRoot);
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs (4)
167.WithWorkingDirectory(testAsset.TestRoot) 173.WithWorkingDirectory(testAsset.TestRoot) 179.WithWorkingDirectory(testAsset.TestRoot) 185.WithWorkingDirectory(testAsset.TestRoot)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (3)
188string fullProjectPath = $"{testInstance.TestRoot}{Path.DirectorySeparatorChar}{testProjectPath}"; 208string fullSolutionPath = $"{testInstance.TestRoot}{Path.DirectorySeparatorChar}{solutionPath}"; 377Assert.True(File.Exists(string.Format("{0}{1}{2}", testInstance.TestRoot, Path.DirectorySeparatorChar, CliConstants.BinLogFileName)));
OutputPathOptionTests.cs (1)
48var slnDirectory = testAsset.TestRoot;
dotnet-watch.Tests (1)
Process\LaunchSettingsProfileTest.cs (1)
51var projectPath = Path.Combine(project.TestRoot, "Project1", "Project1.csproj");
EndToEnd.Tests (6)
GivenFrameworkDependentApps.cs (1)
60string assetsFilePath = Path.Combine(_testInstance.TestRoot, "obj", "project.assets.json");
GivenUsingDefaultRuntimeFrameworkVersions.cs (2)
29var projectFile = new DirectoryInfo(testProject.TestRoot).GetFiles("*.csproj").First().FullName; 57var binDirectory = new DirectoryInfo(testProject.TestRoot).Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault();
GivenWeWantToRequireWindowsForDesktopApps.cs (2)
28string packagesPath = Path.Combine(testInstance.TestRoot, "packages"); 68string packagesPath = Path.Combine(testInstance.TestRoot, "packages", $"runtime.{Rid}.microsoft.windowsdesktop.app");
Utilities\TestProjectCreator.cs (1)
35string projectDirectory = testInstance.TestRoot;
Microsoft.DotNet.ApiCompat.IntegrationTests (42)
CompatibleFrameworkInPackageValidatorIntegrationTests.cs (2)
58PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 99PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
Task\ValidatePackageTargetIntegrationTests.cs (40)
44var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 59var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 73var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 74.Execute($"-p:PackageOutputPath={testAsset.TestRoot}"); 78string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg"); 79result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 93var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 94.Execute($"-p:PackageOutputPath={testAsset.TestRoot}"); 98result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 112var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 113.Execute($"-p:PackageOutputPath={testAsset.TestRoot}"); 117string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg"); 118result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 133string nonExistentPackageBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg"); 134var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 141result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 163PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 179{ NuGetFramework.ParseFolder("netstandard2.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", "netstandard2.0") } }, 180{ NuGetFramework.ParseFolder(ToolsetInfo.CurrentTargetFramework), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", ToolsetInfo.CurrentTargetFramework) } } 205PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 211{ NuGetFramework.ParseFolder("netstandard2.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", "netstandard2.0") } }, 212{ NuGetFramework.ParseFolder(ToolsetInfo.CurrentTargetFramework), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", ToolsetInfo.CurrentTargetFramework) } } 216File.Delete(Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", ToolsetInfo.CurrentTargetFramework, $"{testDummyDependency.Name}.dll")); 246PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 252{ NuGetFramework.ParseFolder("netstandard2.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", "netstandard2.0") } }, 253{ NuGetFramework.ParseFolder(ToolsetInfo.CurrentTargetFramework), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", ToolsetInfo.CurrentTargetFramework) } } 258File.Delete(Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", ToolsetInfo.CurrentTargetFramework, $"{dependency.Name}.dll")); 275PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 281{ NuGetFramework.ParseFolder("netstandard2.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", "netstandard2.0") } } 299PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name)); 305{ NuGetFramework.Parse("netstandard2.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", "netstandard2.0") } }, 306{ NuGetFramework.ParseComponents($".NETCoreApp,Version=v{ToolsetInfo.CurrentTargetFrameworkVersion}", "Windows,Version=7.0"), new string[] { Path.Combine(asset.TestRoot, asset.TestProject.Name, "bin", "Debug", $"net{ToolsetInfo.CurrentTargetFrameworkVersion}-windows") } } 323var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 324.Execute($"-p:PackageOutputPath={testAsset.TestRoot}"); 328string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg"); 329result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 344var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj")) 345.Execute($"-p:PackageOutputPath={testAsset.TestRoot}"); 349string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg"); 350result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
Microsoft.NET.Build.Tests (160)
ArtifactsOutputPathTests.cs (5)
153new DirectoryInfo(Path.Combine(testAsset.TestRoot, testProject.Name)) 157new DirectoryInfo(Path.Combine(testAsset.TestRoot, "artifacts", "obj", testProject.Name, configuration)) 438.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 459new DirectoryInfo(Path.Combine(testAsset.TestRoot, "artifacts")) 479new DirectoryInfo(Path.Combine(testAsset.TestRoot, testProject.Name, "artifacts"))
DesignTimeBuildTests.cs (3)
44var projectDirectory = Path.Combine(testAsset.TestRoot, relativeProjectPath); 175.WithWorkingDirectory(testAsset.TestRoot) 219string projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
GivenFrameworkReferences.cs (4)
324string nugetPackagesFolder = Path.Combine(testAsset.TestRoot, "packages"); 760string nugetPackagesFolder = Path.Combine(testAsset.TestRoot, "packages"); 842var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name); 999string projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
GivenThatAProjectHasntBeenRestored.cs (1)
26var projectDirectory = Path.Combine(testAsset.TestRoot, relativeProjectPath);
GivenThatWeHaveAPackageReferenceWithAliases.cs (3)
46NuGetConfigWriter.Write(testAsset.TestRoot, sources); 91NuGetConfigWriter.Write(testAsset.TestRoot, sources); 128NuGetConfigWriter.Write(testAsset.TestRoot, sources);
GivenThatWeManifestSupportedFrameworks.cs (2)
26string testDirectory = Path.Combine(asset.TestRoot, project.Name); 68string testDirectory = Path.Combine(asset.TestRoot, project.Name);
GivenThatWeWantACustomTFM.cs (2)
27File.WriteAllText(Path.Combine(testAsset.TestRoot, testProject.Name, "CustomTargetFramework.targets"), $@" 46var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name),
GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs (1)
87Path.Combine(asset.TestRoot, project.Name));
GivenThatWeWantToBuildACppCliProject.cs (4)
38new DirectoryInfo(Path.Combine(testAsset.TestRoot, "CSConsoleApp", "bin")).GetDirectories().Single().FullName, 71.WithWorkingDirectory(testAsset.TestRoot) 76var cppnProjProperties = GetPropertyValues(testAsset.TestRoot, "NETCoreCppCliTest", targetFramework: targetFramework); 80var packagesFolder = Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest", "packages");
GivenThatWeWantToBuildACppCliProjectWithTransitiveDeps.cs (3)
20string depsJsonContent = File.ReadAllText(Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest", "Debug", 30var outputDirectory = new DirectoryInfo(Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest", "Debug")); 42var outputDirectory = new DirectoryInfo(Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest", "Debug"));
GivenThatWeWantToBuildACrossTargetedLibrary.cs (3)
108var command = new GetValuesCommand(Log, testAsset.TestRoot, "", valueName: "RuntimeIdentifiers") 144string outputPathValue = File.ReadAllText(Path.Combine(testAsset.TestRoot, testProject.Name, "OutputPathValue.txt")); 185string outputPathValue = File.ReadAllText(Path.Combine(testAsset.TestRoot, testProject.Name, "OutputPathValue.txt"));
GivenThatWeWantToBuildADesktopExe.cs (7)
50WorkingDirectory = testAsset.TestRoot, 164var getValueCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, "PlatformTarget"); 355var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot, 376var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot, 844Path.Combine(testAsset.TestRoot, "App.Config")); 866Path.Combine(testAsset.TestRoot, "App.Config")); 977.WithWorkingDirectory(testAsset.TestRoot)
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (3)
143var getCommandLineCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, AppName), "", "CscCommandLineArgs", GetValuesCommand.ValueType.Item); 157var testLibraryDirectory = new DirectoryInfo(Path.Combine(testAsset.TestRoot, "TestLibrary")); 228new NuGetExeRestoreCommand(Log, testAsset.TestRoot, AppName)
GivenThatWeWantToBuildALibrary.cs (13)
88var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 149var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 183var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 227var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 259var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 285var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 365var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 460var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 602var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformIdentifier"); 633var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformVersion"); 675.WithWorkingDirectory(testAsset.TestRoot) 682.WithWorkingDirectory(testAsset.TestRoot) 1134var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, "TestLibrary"), targetFramework, "PackageConflictPreferredPackages");
GivenThatWeWantToBuildALibraryWithFSharp.cs (4)
81var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 122var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 148var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 212var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs (10)
22WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 47WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 71WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 90WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 110WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 129WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 168WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 187WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 216WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name) 265WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
GivenThatWeWantToBuildALibraryWithVB.cs (4)
92var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 133var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 159var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary"); 230var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs (3)
39Path.Combine(testAsset.TestRoot, "1", "1.csproj"), 120Path.Combine(testAsset.TestRoot, "1", "1.csproj")); 186buildCommand.WithWorkingDirectory(testAsset.TestRoot);
GivenThatWeWantToBuildAnAppWithSharedProject.cs (4)
19var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "TestApp"); 37itemDict["Compile"].Should().Contain((fullPath: Path.Combine(testAsset.TestRoot, "SharedProject", "Class1.cs"), link: "")); 40itemDict["Compile"].Should().Contain((fullPath: Path.Combine(testAsset.TestRoot, "Linked", "LinkedClass.cs"), link: "LinkedClass.cs")); 43itemDict["Content"].Should().Contain((fullPath: Path.Combine(testAsset.TestRoot, "SharedProject", "MyFolder", "TextFile1.txt"),
GivenThatWeWantToBuildANetCoreApp.cs (3)
139NuGetConfigWriter.Write(testAsset.TestRoot); 241var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot, 779string testDirectory = Path.Combine(testAsset.TestRoot, testProject.Name);
GivenThatWeWantToBuildASelfContainedApp.cs (7)
211string oldCasing = Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name, "packs", runtimePack.metadata["NuGetPackageId"].ToLowerInvariant()); 212string newCasing = Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name, "packs", runtimePack.metadata["NuGetPackageId"]); 218.WithEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS, Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name)); 226var packagesFolder = Path.Combine(testAsset.TestRoot, testProject.Name, "packages"); 285string manifestRoot = Path.Combine(testAsset.TestRoot, "manifests"); 403var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework); 550var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm);
GivenThatWeWantToBuildASolutionWithNonAnyCPUPlatform.cs (1)
25new DirectoryInfo(Path.Combine(testAsset.TestRoot, "bin", "x64", "Debug", ToolsetInfo.CurrentTargetFramework))
GivenThatWeWantToBuildAWindowsDesktopProject.cs (4)
310File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent); 342File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent); 582.WithWorkingDirectory(testAsset.TestRoot) 792File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), """
GivenThatWeWantToBuildAWindowsRuntimeComponent.cs (2)
172File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), @"<Project> 253var cppWinTargetDirectory = Path.Combine(testAsset.TestRoot, "SimpleMathComponent");
GivenThatWeWantToBuildWithARuntimeIdentifier.cs (2)
21var buildCommand = new BuildCommand(Log, testAsset.TestRoot, "App.sln"); 44var buildCommand = new BuildCommand(Log, testAsset.TestRoot, "App.sln");
GivenThatWeWantToBuildWithATargetPlatform.cs (2)
121File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent); 159File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent);
GivenThatWeWantToCollectExceptionTelemetry.cs (1)
28var mSBuildCommand = new MSBuildCommand(Log, "GenerateToolsSettingsFileFromBuildProperty", Path.Combine(testAsset.TestRoot));
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (6)
96var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion"); 127var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion"); 159var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion"); 195var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion"); 232var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion"); 730File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.props"), @"
GivenThatWeWantToCopyPPFileToOutput.cs (2)
51WriteFile(Path.Combine(packageAsset.TestRoot, referencedPackage.Name, "Nontransformed.ps1"), "Content file"); 52WriteFile(Path.Combine(packageAsset.TestRoot, referencedPackage.Name, "Test.ps1.pp"), "Content file");
GivenThatWeWantToFloatWarningLevels.cs (8)
52Path.Combine(testAsset.TestRoot, testProject.Name), 96Path.Combine(testAsset.TestRoot, testProject.Name), 141Path.Combine(testAsset.TestRoot, testProject.Name), 197Path.Combine(testAsset.TestRoot, testProject.Name), 244Path.Combine(testAsset.TestRoot, testProject.Name), 340Path.Combine(testAsset.TestRoot, testProject.Name), 357Path.Combine(testAsset.TestRoot, testProject.Name), 463var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToGenerateADepsFileForATool.cs (3)
101NuGetConfigWriter.Write(toolProjectInstance.TestRoot); 106var packCommand = new PackCommand(Log, Path.Combine(toolProjectInstance.TestRoot, toolProject.Name)); 134NuGetConfigWriter.Write(toolReferencerInstance.TestRoot, sources);
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (2)
33var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "LinkTest"); 82var projectFolder = Path.Combine(testAsset.TestRoot, "LinkTest");
GivenThatWeWantToResolveConflicts.cs (2)
70string projectFolder = Path.Combine(tempTestAsset.TestRoot, testProject.Name); 366var prunePackageItemFile = Path.Combine(testAsset.TestRoot, "prunePackageItems.txt");
GivenThatWeWantToResolveRuntimePackAssets.cs (2)
31var projectDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); 64var projectDirectory = Path.Combine(testAsset.TestRoot, testProject.Name);
GivenThatWeWantToRunFromMSBuildTarget.cs (1)
30var runTargetCommand = new MSBuildCommand(Log, "run", Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToUsePlatformAnalyzers.cs (9)
50Path.Combine(testAsset.TestRoot, testProject.Name), 96Path.Combine(testAsset.TestRoot, testProject.Name), 142Path.Combine(testAsset.TestRoot, testProject.Name), 188Path.Combine(testAsset.TestRoot, testProject.Name), 234Path.Combine(testAsset.TestRoot, testProject.Name), 279var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 319Path.Combine(testAsset.TestRoot, testProject.Name), 365Path.Combine(testAsset.TestRoot, testProject.Name), 411Path.Combine(testAsset.TestRoot, testProject.Name),
GivenThatWeWantToUseVB.cs (1)
76Path.Combine(testAsset.TestRoot, testProject.Name),
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (7)
73dependencyTestAsset.TestRoot, 115NuGetConfigWriter.Write(referencerTestAsset.TestRoot, referencerRestoreSources); 151NuGetConfigWriter.Write(testProjectTestAsset.TestRoot, source); 169NuGetConfigWriter.Write(testProjectTestAsset.TestRoot, Path.GetDirectoryName(testPackageReference.NupkgPath)); 185NuGetConfigWriter.Write(testProjectTestAsset.TestRoot, Path.GetDirectoryName(testPackageReference.NupkgPath)); 202NuGetConfigWriter.Write(testProjectTestAsset.TestRoot, source); 274var dependencyProjectDirectory = Path.Combine(testAsset.TestRoot, project.Name);
GivenThereAreDefaultItems.cs (4)
386var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name); 727var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), 765var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name); 816var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
GivenWeWantToRequireWindowsForDesktopApps.cs (1)
129var exePath = Path.Combine(testAsset.TestRoot, testAsset.TestProject.Name,
GlobalPropertyFlowTests.cs (6)
186.WithWorkingDirectory(testAsset.TestRoot) 192.WithWorkingDirectory(testAsset.TestRoot) 198.WithWorkingDirectory(testAsset.TestRoot) 208.WithWorkingDirectory(testAsset.TestRoot) 218.WithWorkingDirectory(testAsset.TestRoot) 229var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: thisTargetFramework);
Net50Targeting.cs (1)
29var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, "TargetFrameworkIdentifier");
ReferenceExeTests.cs (3)
346var testProjectDirectory = Path.Combine(testAsset.TestRoot, "TestProject"); 453File.WriteAllText(Path.Combine(testAssetSelfContained.TestRoot, mtpNotSelfContained.Name, "Directory.Build.targets"), """ 490var testProjectDirectory = Path.Combine(testAsset.TestRoot, "TestProject");
RuntimeIdentifierGraphTests.cs (1)
56var runtimeIdentifierGraphPath = testProject.GetPropertyValues(testAsset.TestRoot)["RuntimeIdentifierGraphPath"];
Microsoft.NET.Clean.Tests (5)
GivenThatWeWantToCleanAProject.cs (5)
23var lockFilePath = Path.Combine(testAsset.TestRoot, "obj", "project.assets.json"); 35var cleanCommand = new CleanCommand(Log, testAsset.TestRoot); 52var assetsFilePath = Path.Combine(testAsset.TestRoot, "obj", "project.assets.json"); 55var cleanCommand = new CleanCommand(Log, testAsset.TestRoot); 72var cleanAndBuildCommand = new MSBuildCommand(Log, "Clean;Build", testAsset.TestRoot);
Microsoft.NET.Pack.Tests (12)
GivenThatThereAreImplicitPackageReferences.cs (1)
260var packCommand = new PackCommand(Log, testProjectInstance.TestRoot, testProject.Name);
GivenThatWeWantToPackACppCliProject.cs (1)
23new PackCommand(Log, Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest", "NETCoreCppCliTest.vcxproj"))
GivenThatWeWantToPackACrossTargetedLibrary.cs (1)
19var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "NetStandardAndNetCoreApp");
GivenThatWeWantToPackAHelloWorldProject.cs (6)
23var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot); 70new PackCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)) 89var packCommand = new DotnetPackCommand(Log, helloWorldAsset.TestRoot); 116var packCommand = new DotnetPackCommand(Log, helloWorldAsset.TestRoot); 147var packCommand = new DotnetPackCommand(Log, helloWorldAsset.TestRoot); 170var publishCommand = new DotnetPublishCommand(Log, helloWorldAsset.TestRoot);
GivenThatWeWantToPackANetFrameworkLibrary.cs (1)
79var packCommand = new PackCommand(Log, testProjectInstance.TestRoot, testProject.Name);
GivenThatWeWantToPackAProjectTool.cs (2)
29var packCommand = new PackCommand(Log, Path.Combine(asset.TestRoot, toolProject.Name)); 48var result = new PackCommand(Log, Path.Combine(asset.TestRoot, toolProject.Name)).Execute();
Microsoft.NET.Publish.Tests (94)
GivenThatWeWantToPreserveCompilationContext.cs (2)
183var manifestFile = Path.Combine(testAsset.TestRoot, "manifest.xml"); 193var appProjectDirectory = Path.Combine(testAsset.TestRoot, "TestApp");
GivenThatWeWantToPublishACppCliAppProject.cs (1)
21new PublishCommand(Log, Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest.sln"))
GivenThatWeWantToPublishACppCliProject.cs (3)
21new PublishCommand(Log, Path.Combine(testAsset.TestRoot, "CSConsoleApp")) 27new DirectoryInfo(Path.Combine(testAsset.TestRoot, "CSConsoleApp", "bin")).GetDirectories().Single().FullName, 49new PublishCommand(Log, Path.Combine(testAsset.TestRoot, "NETCoreCppCliTest"))
GivenThatWeWantToPublishAHelloWorldProject.cs (10)
437new DotnetPublishCommand(Log, helloWorldAsset.TestRoot) 460new DotnetPublishCommand(Log, helloWorldAsset.TestRoot) 539var publishCommand = new DotnetPublishCommand(Log, helloWorldAsset.TestRoot); 561new DotnetPublishCommand(Log, helloWorldAsset.TestRoot) 592new DotnetPublishCommand(Log, helloWorldAsset.TestRoot) 620.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 625var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: "net8.0", configuration: "Release"); 645.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 650var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm, configuration: tfm == "net7.0" ? "Debug" : "Release"); 1096var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToPublishAnAotApp.cs (21)
47var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 56var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 145var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration); 196var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration); 240var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 291var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 410var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 464var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 488var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 512var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 535var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 565var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 584var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 599var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 699var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 739var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 834var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 869var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 896var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 922var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 942var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToPublishAProjectWithAllFeatures.cs (1)
205var appProjectDirectory = Path.Combine(testAsset.TestRoot, "TestApp");
GivenThatWeWantToPublishAProjectWithDependencies.cs (2)
94var appProjectDirectory = Path.Combine(testAsset.TestRoot, "App"); 250var libPublishCommand = new PublishCommand(Log, Path.Combine(libAsset.TestRoot, "NetStdLib"));
GivenThatWeWantToPublishASingleFileApp.cs (4)
69string longDirPath = Path.Combine(testAsset.TestRoot, SmallNameDir, LargeNameDir); 636var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 656var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 672var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToPublishASingleFileLibrary.cs (2)
42var referencedProjProperties = referencedProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework); 43var mainProjProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework);
GivenThatWeWantToPublishIncrementally.cs (7)
86File.Move(Path.Combine(testAsset.TestRoot, testProject.Name, testProject.Name + ".csproj"), 87Path.Combine(testAsset.TestRoot, testProject.Name, newName + ".csproj")); 229var publishDir = Path.Combine(testAsset.TestRoot, testProject.Name, publishOutputFolder); 265var publishDir1 = Path.Combine(testAsset.TestRoot, testProject.Name, publishOutputFolder1); 266var publishDir2 = Path.Combine(testAsset.TestRoot, testProject.Name, publishOutputFolder2); 289File.Move(Path.Combine(testAsset.TestRoot, testProject.Name, testProject.Name + ".csproj"), 290Path.Combine(testAsset.TestRoot, testProject.Name, newName + ".csproj"));
GivenThatWeWantToPublishWithoutConflicts.cs (2)
32var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "ResolvedFileToPublish", GetValuesCommand.ValueType.Item) 71var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "ResolvedFileToPublish", GetValuesCommand.ValueType.Item)
GivenThatWeWantToRunILLink.cs (4)
890var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 988var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 1008var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 1025var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToStoreAProjectWithDependencies.cs (23)
61var storeCommand = new ComposeStoreCommand(Log, simpleDependenciesAsset.TestRoot, "FluentAssertion.xml"); 63var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir"); 64var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w"); 91var storeCommand = new ComposeStoreCommand(Log, simpleDependenciesAsset.TestRoot, "FluentAssertion.xml"); 93var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir"); 94var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w"); 134var storeCommand = new ComposeStoreCommand(Log, simpleDependenciesAsset.TestRoot, "NewtonsoftFilterProfile.xml") 139var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "o"); 140var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w"); 141var additionalproj1 = Path.Combine(simpleDependenciesAsset.TestRoot, "NewtonsoftMultipleVersions.xml"); 142var additionalproj2 = Path.Combine(simpleDependenciesAsset.TestRoot, "FluentAssertion.xml"); 188var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o"); 189var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w"); 191new ComposeStoreCommand(Log, targetManifestsAsset.TestRoot, "StarVersion.xml") 222var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o"); 223var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w"); 225var composeStore = new ComposeStoreCommand(Log, targetManifestsAsset.TestRoot, "NewtonsoftFilterProfile.xml"); 283var outputFolder = Path.Combine(testProjectInstance.TestRoot, "o"); 284var workingDir = Path.Combine(testProjectInstance.TestRoot, "w"); 286new ComposeStoreCommand(Log, testProjectInstance.TestRoot, testProject.Name) 314var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o"); 315var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w"); 317var composeStore = new ComposeStoreCommand(Log, targetManifestsAsset.TestRoot, "PrunePackages.xml")
GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs (2)
363.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 368var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: "net7.0", configuration: "Release"); // this will fail if configuration is debug and TFM code didn't work.
PublishItemsOutputGroupOutputsTests.cs (1)
65command.WithWorkingDirectory(testAsset.TestRoot).Execute("/bl:{}.binlog").Should().Pass();
RuntimeIdentifiersTests.cs (9)
102var runtimeIdentifier = testProject.GetPropertyValues(testAsset.TestRoot)["RuntimeIdentifier"]; 217.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name)) 223var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: tfm); 248.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, MethodBase.GetCurrentMethod().Name)) 253var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: tfm); 283var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 299var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm, configuration: useFrameworkDependentDefaultTargetFramework ? "Release" : "Debug"); 329var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 379var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
Microsoft.NET.Rebuild.Tests (2)
GivenThatWeWantToRebuildAProject.cs (2)
23var lockFilePath = Path.Combine(testAsset.TestRoot, "obj", "project.assets.json"); 35var rebuildCommand = new RebuildCommand(Log, testAsset.TestRoot);
Microsoft.NET.Restore.Tests (4)
GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs (1)
39NuGetConfigWriter.Write(toolProjectInstance.TestRoot);
GivenThatWeWantToRestoreDotNetCliToolReference.cs (2)
34var packCommand = new PackCommand(Log, Path.Combine(toolProjectInstance.TestRoot, toolProject.Name)); 55NuGetConfigWriter.Write(toolReferenceProjectInstance.TestRoot, nupkgPath);
GivenThatWeWantToRestoreProjectsUsingNuGetConfigProperties.cs (1)
145projectInNuGetFallbackFolderTestAsset.TestRoot,
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (7)
ServiceWorkerAssert.cs (3)
21var serviceWorkerResolvedPath = Path.Combine(testAsset.TestRoot, outputDirectory, staticWebAssetsBasePath, serviceWorkerPath); 22var assetsManifestResolvedPath = Path.Combine(testAsset.TestRoot, outputDirectory, staticWebAssetsBasePath, assetsManifestPath); 32var resolvedPublishDirectory = Path.Combine(testAsset.TestRoot, outputDirectory);
WasmAoTPublishIntegrationTest.cs (3)
29File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 73File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "web.config"), webConfigContents); 103File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }");
WasmPublishIntegrationTestBase.cs (1)
57new FileInfo(Path.Combine(testAsset.TestRoot, relativePath)).Should().HashEquals(ParseWebFormattedHash(hash));
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (65)
AspNetSdkBaselineTest.cs (2)
147ProjectDirectory.TestRoot, 243ProjectDirectory.TestRoot,
BlazorWasmStaticWebAssetsIntegrationTest.cs (7)
27File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }"); 28File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "appsettings.development.json"), "{}"); 69File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }"); 70File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "appsettings.development.json"), "{}"); 150File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 190File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 289File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }");
ServiceWorkerAssert.cs (3)
21var serviceWorkerResolvedPath = Path.Combine(testAsset.TestRoot, outputDirectory, staticWebAssetsBasePath, serviceWorkerPath); 22var assetsManifestResolvedPath = Path.Combine(testAsset.TestRoot, outputDirectory, staticWebAssetsBasePath, assetsManifestPath); 32var resolvedPublishDirectory = Path.Combine(testAsset.TestRoot, outputDirectory);
WasmBuildIncrementalismTest.cs (8)
77var gzipCompressionDirectory = Path.Combine(projectDirectory.TestRoot, "blazorwasm", "obj", "Debug", DefaultTfm, "compressed"); 114File.Move(Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resources.ja.resx.txt"), Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resource.ja.resx")); 196File.Move(Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resources.ja.resx.txt"), Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resource.ja.resx")); 226File.Move(Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resources.ja.resx.txt"), Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resource.ja.resx")); 253File.Delete(Path.Combine(projectDirectory.TestRoot, "blazorwasm", "Resource.ja.resx"));
WasmBuildIntegrationTest.cs (7)
37File.WriteAllText(Path.Combine(testInstance.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }"); 197var wwwroot = Path.Combine(testInstance.TestRoot, "blazorwasm", "wwwroot"); 244var wwwroot = Path.Combine(testInstance.TestRoot, "blazorwasm", "wwwroot"); 587var resxfileInProject = Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "Resources.ja.resx.txt"); 588File.Move(resxfileInProject, Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "Resource.ja.resx")); 705var nugetRestorePath = Path.Combine(testInstance.TestRoot, ".nuget"); 708.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"))
WasmBuildLazyLoadTest.cs (1)
261var publishCommand = new PublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorwasm"));
WasmCompressionTests.cs (12)
40var blazorBootJson = Path.Combine(testInstance.TestRoot, publishCommand.GetOutputDirectory(DefaultTfm).ToString(), "wwwroot", "_framework", WasmBootConfigFileName); 42var blazorBootJsonCompressed = Path.Combine(testInstance.TestRoot, publishCommand.GetOutputDirectory(DefaultTfm).ToString(), "wwwroot", "_framework", $"{WasmBootConfigFileName}.br"); 45var programFile = Path.Combine(testInstance.TestRoot, "blazorwasm", "Program.cs"); 50publishCommand = new PublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 94var programFile = Path.Combine(testInstance.TestRoot, "blazorwasm", "Program.cs"); 99publishCommand = new PublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 116var publishCommand = new PublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 117publishCommand.WithWorkingDirectory(testInstance.TestRoot); 123var compressedFilesFolder = Path.Combine(testInstance.TestRoot, "blazorwasm", "obj", "Debug", DefaultTfm, "compressed", "publish"); 148var publishCommand = new PublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 155var compressedFilesFolder = Path.Combine(testInstance.TestRoot, "blazorwasm", "obj", "Debug", DefaultTfm, "compressed", "publish"); 181publishCommand.WithWorkingDirectory(testInstance.TestRoot);
WasmJsModulesIntegrationTests.cs (8)
28File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "blazorwasm-minimal.lib.module.js"), "console.log('Hello initializer')"); 72File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "wwwroot", "blazorwasm.lib.module.js"), "console.log('Hello initializer')"); 73File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "razorclasslibrary", "wwwroot", "razorclasslibrary.lib.module.js"), "console.log('Hello RCL initializer')"); 117File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "blazorwasm-minimal.lib.module.js"), "console.log('Hello initializer')"); 166File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "blazorwasm-minimal.lib.module.js"), "console.log('Publish initializer')"); 167File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "blazorwasm-minimal.lib.module.build.js"), "console.log('Build initializer')"); 211File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "blazorwasm-minimal.lib.module.js"), "console.log('Hello initializer')"); 276File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "blazorwasm", "wwwroot", "blazorwasm.lib.module.js"), "console.log('Hello initializer')");
WasmPublishIntegrationTest.cs (13)
174File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 224File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 262File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "web.config"), webConfigContents); 687var wwwroot = Path.Combine(testInstance.TestRoot, "blazorwasm", "wwwroot"); 748var resxfileInProject = Path.Combine(testInstance.TestRoot, "blazorwasm", "Resources.ja.resx.txt"); 749File.Move(resxfileInProject, Path.Combine(testInstance.TestRoot, "blazorwasm", "Resource.ja.resx")); 1045File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); 1162var resxfileInProject = Path.Combine(testInstance.TestRoot, "blazorwasm", "Resources.ja.resx.txt"); 1163File.Move(resxfileInProject, Path.Combine(testInstance.TestRoot, "blazorwasm", "Resource.ja.resx")); 1243var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 1245publishCommand.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted")); 1268var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted")); 1270publishCommand.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"));
WasmPublishIntegrationTestBase.cs (1)
57new FileInfo(Path.Combine(testAsset.TestRoot, relativePath)).Should().HashEquals(ParseWebFormattedHash(hash));
WasmPwaManifestTests.cs (3)
35buildCommand.WithWorkingDirectory(testInstance.TestRoot); 75var buildOutputDirectory = OutputPathCalculator.FromProject(Path.Combine(testInstance.TestRoot, "blazorwasm")).GetOutputDirectory(); 177var cssFile = Path.Combine(testInstance.TestRoot, "blazorwasm", "LinkToWebRoot", "css", "app.css");
Microsoft.NET.Sdk.Razor.Tests (6)
MvcBuildIntegrationTest21NetFx.cs (2)
66var publish = new PublishCommand(Log, project.TestRoot); 87var publish = new PublishCommand(Log, project.TestRoot);
MvcBuildIntegrationTestLegacy.cs (2)
72var publish = new PublishCommand(Log, project.TestRoot); 94var publish = new PublishCommand(Log, project.TestRoot);
PublishIntegrationTest.cs (2)
51var publish = new PublishCommand(Log, projectDirectory.TestRoot); 183publish.WithWorkingDirectory(projectDirectory.TestRoot);
Microsoft.NET.Sdk.StaticWebAssets.Tests (35)
AspNetSdkBaselineTest.cs (2)
147ProjectDirectory.TestRoot, 243ProjectDirectory.TestRoot,
JsModulesIntegrationTest.cs (15)
18Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot")); 19File.WriteAllText(Path.Combine(projectDirectory.TestRoot, "wwwroot", "ComponentApp.lib.module.js"), "console.log('Hello world!');"); 40Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot")); 41File.WriteAllText(Path.Combine(projectDirectory.TestRoot, "wwwroot", "ComponentApp.lib.module.js"), "console.log('Hello world!');"); 60CreateFile("", ProjectDirectory.TestRoot, "Components", "Pages", "Counter.razor.js"); 63CreateFile("", ProjectDirectory.TestRoot, "Pages", "Index.cshtml"); 64CreateFile("", ProjectDirectory.TestRoot, "Pages", "Index.cshtml.js"); 97Directory.CreateDirectory(Path.Combine(ProjectDirectory.TestRoot, "wwwroot")); 98File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "wwwroot", "ComponentApp.lib.module.js"), "console.log('Hello world!');"); 157Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot")); 158File.WriteAllText(Path.Combine(projectDirectory.TestRoot, "wwwroot", "ComponentApp.lib.module.js"), "console.log('Hello world!');"); 190Directory.CreateDirectory(Path.Combine(path[..^1].Prepend(ProjectDirectory.TestRoot).ToArray())); 191File.WriteAllText(Path.Combine(path.Prepend(ProjectDirectory.TestRoot).ToArray()), content); 343Directory.CreateDirectory(Path.Combine(path[..^1].Prepend(ProjectDirectory.TestRoot).ToArray())); 344File.WriteAllText(Path.Combine(path.Prepend(ProjectDirectory.TestRoot).ToArray()), content);
LegacyStaticWebAssetsV1IntegrationTest.cs (6)
36Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "AnotherClassLib", "Views"), recursive: true); 37Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "ClassLibrary", "Views"), recursive: true); 38Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "ClassLibrary", "Components"), recursive: true); 99Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "AnotherClassLib", "Views"), recursive: true); 100Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "ClassLibrary", "Views"), recursive: true); 101Directory.Delete(Path.Combine(ProjectDirectory.TestRoot, "ClassLibrary", "Components"), recursive: true);
ScopedCssIntegrationTests.cs (2)
414var scopedCssFile = Path.Combine(ProjectDirectory.TestRoot, "Components", "Pages", "Index.razor.css"); 425var collocatedJsFile = Path.Combine(ProjectDirectory.TestRoot, "Components", "Pages", "Index.razor.js");
StaticWebAssetEndpointsIntegrationTest.cs (4)
27var root = ProjectDirectory.TestRoot; 177var root = ProjectDirectory.TestRoot; 307var root = ProjectDirectory.TestRoot; 452var buildOutputDirectory = OutputPathCalculator.FromProject(Path.Combine(testInstance.TestRoot, "blazorhosted")).GetOutputDirectory();
StaticWebAssetsCrossTargetingTests.cs (2)
41var wwwroot = Directory.CreateDirectory(Path.Combine(ProjectDirectory.TestRoot, "wwwroot")); 85var wwwroot = Directory.CreateDirectory(Path.Combine(ProjectDirectory.TestRoot, "wwwroot"));
StaticWebAssetsDesignTimeTest.cs (2)
128return (MSBuildCommand)new MSBuildCommand(testAsset.Log, targets, testAsset.TestRoot, relativeProjectPath) 129.WithWorkingDirectory(testAsset.TestRoot);
StaticWebAssetsFingerprintingTest.cs (2)
83var projectName = Path.GetFileNameWithoutExtension(Directory.EnumerateFiles(ProjectDirectory.TestRoot, "*.csproj").Single()); 119var indexHtmlPath = Path.Combine(testAsset.TestRoot, "wwwroot", "index.html");
Microsoft.NET.Sdk.Web.Tests (4)
PublishTests.cs (4)
34var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 71var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 91var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); 94var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework);
Microsoft.NET.TestFramework (10)
AspNetSdkTest.cs (5)
93restore.WithWorkingDirectory(asset.TestRoot); 101build.WithWorkingDirectory(asset.TestRoot); 110rebuild.WithWorkingDirectory(asset.TestRoot); 119pack.WithWorkingDirectory(asset.TestRoot); 128publish.WithWorkingDirectory(asset.TestRoot);
Commands\DotnetBuildCommand.cs (2)
24WorkingDirectory = Path.Combine(testAsset.TestRoot, testAsset.TestProject.Name); 28WorkingDirectory = testAsset.TestRoot;
Commands\MSBuildCommand.cs (1)
35: this(testAsset.Log, target, testAsset.TestRoot, relativePathToProject ?? testAsset.TestProject?.Name, requiredArgs)
TestAsset.cs (1)
278return new RestoreCommand(log, System.IO.Path.Combine(TestRoot, relativePath));
Utilities\FileThumbPrint.cs (1)
43directoryPath = System.IO.Path.Combine(testAsset.TestRoot, directoryPath);
Microsoft.NET.ToolPack.Tests (19)
GivenThatWeWantToPackAToolProject.cs (5)
39_testRoot = helloWorldAsset.TestRoot; 91_testRoot = helloWorldAsset.TestRoot; 93var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot); 318_testRoot = helloWorldAsset.TestRoot; 320var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot);
GivenThatWeWantToPackAToolProjectWithComplexNugetDependency.cs (1)
34var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot);
GivenThatWeWantToPackAToolProjectWithGeneratePackageOnBuild.cs (1)
96var appProjectDirectory = Path.Combine(testAsset.TestRoot);
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (10)
38_testRoot = helloWorldAsset.TestRoot; 156_testRoot = helloWorldAsset.TestRoot; 158new PackCommand(Log, helloWorldAsset.TestRoot).Execute().Should().Pass(); 180_testRoot = helloWorldAsset.TestRoot; 206_testRoot = helloWorldAsset.TestRoot; 208var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot); 211var cleanCommand = new CleanCommand(Log, helloWorldAsset.TestRoot); 235_testRoot = helloWorldAsset.TestRoot; 321var testRoot = helloWorldAsset.TestRoot; 414var tmpfilePath = Path.Combine(asset.TestRoot, "temp", Path.GetRandomFileName());
GivenThatWeWantToPackAToolTargetingNonSupportedTFM.cs (1)
42var packCommand = new PackCommand(Log, helloWorldAsset.TestRoot);
GivenThatWeWantToTestPackAToolProject.cs (1)
19var appProjectDirectory = Path.Combine(testAsset.TestRoot, "Test");