1 instantiation of TestContext
Microsoft.NET.TestFramework (1)
TestContext.cs (1)
150TestContext testContext = new();
345 references to TestContext
ArgumentForwarding.Tests (2)
ArgumentForwardingTests.cs (1)
253FileName = TestContext.Current.ToolsetUnderTest.DotNetHostPath,
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
containerize.UnitTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
dotnet.Tests (139)
CommandFactoryTests\GivenADotnetToolsCommandResolver.cs (1)
17var dotnetToolPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "DotnetTools");
CommandFactoryTests\GivenAProjectDependencyCommandResolver.cs (6)
19Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "MSBuild.dll")); 31NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 66NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 97NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 126NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 166Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "MSBuild.dll"));
CommandFactoryTests\GivenAProjectToolsCommandResolver.cs (13)
88NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 112NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 142NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 167NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 194NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 222NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 233var nugetPackagesRoot = TestContext.Current.TestGlobalPackagesFolder; 268NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 272var toolPathCalculator = new ToolPathCalculator(TestContext.Current.TestGlobalPackagesFolder); 305NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 334var nugetConfig = UseNuGetConfigWithFallbackFolder(testInstance, fallbackFolder, TestContext.Current.TestPackages); 360var nugetConfig = UseNuGetConfigWithFallbackFolder(testInstance, fallbackFolder, TestContext.Current.TestPackages); 432return Path.Combine(TestContext.Current.ToolsetUnderTest.SdksPath, "Microsoft.NET.Sdk", "targets", "GenerateDeps", "GenerateDeps.proj");
CommandTests\Build\GivenDotnetBuildBuildsCsproj.cs (3)
183if (!TestContext.IsLocalized()) 344NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 381TestContext.Current.NuGetCachePath,
CommandTests\New\SdkInfoProviderTests.cs (1)
14string? dotnetRootUnderTest = TestContext.Current.ToolsetUnderTest?.DotNetRoot;
CommandTests\NuGet\GivenANuGetCommand.cs (1)
149NuGetConfigWriter.Write(projectDirectory, TestContext.Current.TestPackages);
CommandTests\Pack\PackTests.cs (2)
179if (!TestContext.IsLocalized()) 275if (!TestContext.IsLocalized())
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (1)
415if (!TestContext.IsLocalized())
CommandTests\Run\GivenDotnetRootEnv.cs (1)
22string expectDotnetRoot = TestContext.Current.ToolsetUnderTest.DotNetRoot;
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (3)
83if (!TestContext.IsLocalized()) 687if (!TestContext.IsLocalized()) 1017if (!TestContext.IsLocalized())
CommandTests\Run\RunFileTests.cs (6)
124var sourceNuGetConfig = Path.Join(TestContext.Current.TestExecutionDirectory, "NuGet.config"); 2224string sdkPath = NormalizePath(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest); 2225string dotNetRootPath = NormalizePath(TestContext.Current.ToolsetUnderTest.DotNetRoot); 2226string nuGetCachePath = NormalizePath(TestContext.Current.NuGetCachePath!); 2393TestContext.Current.ToolsetUnderTest.RepoRoot, 2830var expectedDotNetRoot = TestContext.Current.ToolsetUnderTest.DotNetRoot;
CommandTests\Test\GivenDotnetTestBuildsAndDiscoversTests.cs (6)
29if (!TestContext.IsLocalized()) 52if (!TestContext.IsLocalized()) 75if (!TestContext.IsLocalized()) 96if (!TestContext.IsLocalized()) 121if (!TestContext.IsLocalized()) 142if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsHelp.cs (2)
28if (!TestContext.IsLocalized()) 52if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs (3)
37if (!TestContext.IsLocalized()) 78if (!TestContext.IsLocalized()) 114if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (21)
29if (!TestContext.IsLocalized()) 55if (!TestContext.IsLocalized()) 125if (!TestContext.IsLocalized()) 150if (!TestContext.IsLocalized()) 180if (!TestContext.IsLocalized()) 212if (!TestContext.IsLocalized()) 324if (!TestContext.IsLocalized()) 353if (!TestContext.IsLocalized()) 403if (!TestContext.IsLocalized()) 425if (!TestContext.IsLocalized()) 460if (!TestContext.IsLocalized()) 496if (!TestContext.IsLocalized()) 532if (!TestContext.IsLocalized()) 569if (!TestContext.IsLocalized()) 601if (!TestContext.IsLocalized()) 629if (!TestContext.IsLocalized()) 676if (!TestContext.IsLocalized()) 704if (!TestContext.IsLocalized()) 727if (!TestContext.IsLocalized()) 775if (!TestContext.IsLocalized()) 798if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs (3)
27NuGetConfigWriter.Write(testProjectDirectory, TestContext.Current.TestPackages); 40if (!TestContext.IsLocalized()) 78if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsprojWithCorrectTestRunParameters.cs (2)
33if (!TestContext.IsLocalized()) 67if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromDll.cs (3)
39if (!TestContext.IsLocalized()) 103if (!TestContext.IsLocalized()) 127if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTests.cs (16)
29if (!TestContext.IsLocalized()) 54if (!TestContext.IsLocalized()) 81if (!TestContext.IsLocalized()) 107if (!TestContext.IsLocalized()) 137if (!TestContext.IsLocalized()) 204if (!TestContext.IsLocalized()) 230if (!TestContext.IsLocalized()) 259if (!TestContext.IsLocalized()) 279if (!TestContext.IsLocalized()) 299if (!TestContext.IsLocalized()) 319if (!TestContext.IsLocalized()) 339if (!TestContext.IsLocalized()) 365if (!TestContext.IsLocalized()) 395if (!TestContext.IsLocalized()) 454if (!TestContext.IsLocalized()) 494if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (5)
32if (!TestContext.IsLocalized()) 72if (!TestContext.IsLocalized()) 122if (!TestContext.IsLocalized()) 161if (!TestContext.IsLocalized()) 188if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs (3)
28if (!TestContext.IsLocalized()) 57string? versionsPropsPath = PathUtility.FindFileInParentDirectories(TestContext.Current.TestExecutionDirectory, $"eng{Path.DirectorySeparatorChar}Version.Details.props") ?? throw new FileNotFoundException("Version.Details.props file not found."); 65if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (6)
247if (!TestContext.IsLocalized()) 395if (!TestContext.IsLocalized()) 420if (!TestContext.IsLocalized()) 445if (!TestContext.IsLocalized()) 484if (!TestContext.IsLocalized()) 517if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestContainsEnvironmentVariables.cs (2)
47if (!TestContext.IsLocalized()) 90if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestContainsMSBuildParameters.cs (1)
35if (!TestContext.IsLocalized())
CommandTests\Test\GivenDotnetTestForwardDotnetRootEnvironmentVariables.cs (1)
30if (!TestContext.IsLocalized())
CommandTests\Test\TestCommandValidationTests.cs (3)
38if (!TestContext.IsLocalized()) 64if (!TestContext.IsLocalized()) 92if (!TestContext.IsLocalized())
CommandTests\Tool\Install\ToolInstallCommandTests.cs (1)
41var ridGraphPath = TestContext.GetRuntimeGraphFilePath();
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (2)
77runtimeJsonPathForTests: TestContext.GetRuntimeGraphFilePath(), 630var ridGraphPath = TestContext.GetRuntimeGraphFilePath();
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (1)
238runtimeJsonPathForTests: TestContext.GetRuntimeGraphFilePath(),
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (1)
96runtimeJsonPathForTests: TestContext.GetRuntimeGraphFilePath(),
CommandTests\VSTest\VSTestTests.cs (3)
39if (!TestContext.IsLocalized()) 80if (!TestContext.IsLocalized()) 151if (!TestContext.IsLocalized())
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (2)
584var sdkFeatureBand = new SdkFeatureBand(TestContext.Current.ToolsetUnderTest.SdkVersion); 622var sdkFeatureBand = new SdkFeatureBand(TestContext.Current.ToolsetUnderTest.SdkVersion);
GivenThatTheUserIsRunningDotNetForTheFirstTime.cs (1)
246return TestContext.Current.ToolsetUnderTest.SdkVersion;
GivenThatWeWantToBeBackwardsCompatibleWith1xProjects.cs (1)
69NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages);
PackagedCommandTests.cs (6)
28NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 50NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 85NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 141NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 220NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 236NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages);
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
ShellShimTests\AppHostShellShimMakerTests.cs (1)
37var appHostShellShimMaker = new AppHostShellShimMaker(Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "AppHostTemplate"));
ShellShimTests\ShellShimRepositoryTests.cs (3)
474TestContext.Current.ToolsetUnderTest.DotNetRoot; 479TestContext.Current.ToolsetUnderTest.DotNetRoot; 492Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "AppHostTemplate");
TestAssetExtensions.cs (1)
44.Add(new XElement(ns + "RestorePackagesPath", TestContext.Current.TestGlobalPackagesFolder));
dotnet-format.UnitTests (3)
Analyzers\AnalyzerAssemblyGenerator.cs (1)
38var nugetConfigPath = Path.Combine(TestContext.Current.TestExecutionDirectory, "NuGet.config");
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Utilities\TestProjectsPathHelper.cs (1)
15var assetsDirectory = Path.Combine(TestContext.Current.TestAssetsDirectory, "dotnet-format");
dotnet-MsiInstallation.Tests (4)
Framework\VMTestBase.cs (3)
143Log.WriteLine($"Deploying SDK from {TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest} to {installedSdkFolder} on VM."); 147VM.CopyFolder(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, installedSdkFolder), 180var newVersionFileContents = File.ReadAllLines(Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, ".version"));
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
dotnet-new.IntegrationTests (18)
BaseIntegrationTest.cs (2)
17public static string DotnetNewTestAssets { get; } = VerifyExists(Path.Combine(TestContext.Current.TestAssetsDirectory, "TestPackages", "dotnet-new")); 181string repoRoot = Path.GetFullPath(Path.Combine(TestContext.Current.TestAssetsDirectory, "..", ".."));
CommonTemplatesTests.cs (6)
60TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 72DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath, 204TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 217DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath, 399TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 416DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath,
DotnetClassTemplateTests.cs (4)
51TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 71DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath, 131TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 151DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath,
DotnetNewInstantiateTests.cs (2)
364if (!TestContext.IsLocalized()) 439if (!TestContext.IsLocalized())
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
TemplateEngineSamplesTest.cs (2)
49TestContext.Current.AddTestEnvironmentVariables(environmentUnderTest); 59DotnetExecutablePath = TestContext.Current.ToolsetUnderTest?.DotNetHostPath,
Utilities.cs (1)
18return Path.Combine(TestContext.Current.TestExecutionDirectory, "dotnet-new.IntegrationTests");
dotnet-watch.Tests (8)
Build\EvaluationTests.cs (1)
14=> TestContext.Current.ToolsetUnderTest.DotNetHostPath;
CommandLine\BinaryLoggerTests.cs (1)
40var dir = TestContext.Current.TestExecutionDirectory;
CommandLine\CommandLineOptionsTests.cs (1)
499var path = TestContext.Current.TestAssetsDirectory;
CommandLine\ProgramTests.cs (1)
26TestOptions.GetEnvironmentOptions(workingDirectory: testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset),
FileWatcher\FileWatcherTests.cs (1)
99string root = TestContext.Current.TestExecutionDirectory;
HotReload\RuntimeProcessLauncherTests.cs (1)
99var environmentOptions = TestOptions.GetEnvironmentOptions(workingDirectory ?? testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset);
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
TestUtilities\ModuleInitializer.cs (1)
23var toolset = TestContext.Current.ToolsetUnderTest;
EndToEnd.Tests (7)
GivenDotNetUsesMSBuild.cs (2)
62NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages); 96NuGetConfigWriter.Write(testInstance.Path, TestContext.Current.TestPackages);
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
ProjectBuildTests.cs (2)
405string dotnetFolder = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath); 471string dotnetRoot = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath);
ValidateInsertedManifests.cs (1)
15var sdkManifestDir = Path.Combine(Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath), "sdk-manifests");
VersionTests.cs (1)
16var dotnetFolder = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath);
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.ApiCompat.IntegrationTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.ApiCompatibility.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.ApiDiff.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.Cli.Utils.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.GenAPI.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.HotReload.Client.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.PackageInstall.Tests (8)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
TestToolBuilder.cs (1)
103var targetDirectory = Path.Combine(TestContext.Current.TestExecutionDirectory, "TestTools", toolSettings.GetIdentifier());
ToolPackageDownloaderTests.cs (4)
29string dotnetRootUnderTest = TestContext.Current.ToolsetUnderTest.DotNetRoot; 733var testRuntimeJsonPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json"); 902runtimeJsonPathForTests: TestContext.GetRuntimeGraphFilePath(), 915var testRuntimeJsonPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json");
ToolPackageInstallerNugetCacheTests.cs (1)
142var runtimeJsonPathForTests = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json");
ToolPackageUninstallerTests.cs (1)
109var testRuntimeJsonPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json");
Microsoft.DotNet.PackageValidation.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.DotNet.TemplateLocator.Tests (2)
GivenAnTemplateLocator.cs (2)
18Path.Combine(TestContext.Current.TestExecutionDirectory, Path.GetRandomFileName()); 67Path.Combine(TestContext.Current.TestExecutionDirectory, Path.GetRandomFileName());
Microsoft.Extensions.DotNetDeltaApplier.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Build.Containers.IntegrationTests (1)
FullFramework\CreateNewImageToolTaskTests.cs (1)
599return Path.Combine(TestContext.Current.TestExecutionDirectory, "Container", "containerize");
Microsoft.NET.Build.Containers.UnitTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Build.Extensions.Tasks.UnitTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Build.Tasks.UnitTests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Build.Tests (27)
AppHostTests.cs (1)
74Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath))
AspNetCoreOnFullFramework.cs (1)
90TestContext.Current.AddTestEnvironmentVariables(toolCommandSpec.Environment);
DeleteNuGetArtifactsFixture.cs (1)
41foreach (string dir in Directory.EnumerateDirectories(TestContext.Current.NuGetCachePath, ConstantStringValues.DependencyDirectoryNamePrefix + "*"))
GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs (2)
59TestContext.Current.NuGetCachePath, 65TestContext.Current.NuGetCachePath,
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (1)
211new XAttribute("Path", TestContext.Current.ToolsetUnderTest.GetMicrosoftNETBuildExtensionsPath()),
GivenThatWeWantToBuildADesktopLibrary.cs (2)
440string microsoftNETBuildExtensionsPath = TestContext.Current.ToolsetUnderTest.GetMicrosoftNETBuildExtensionsPath(); 445correctHttpReference = Path.Combine(TestContext.Current.NuGetCachePath, "system.net.http", "4.3.2", "ref", "net46", "System.Net.Http.dll");
GivenThatWeWantToBuildALibrary.cs (1)
392var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
GivenThatWeWantToBuildANetCoreApp.cs (3)
62[InlineData("netcoreapp2.0", true, true, TestContext.LatestRuntimePatchForNetCoreApp2_0)] 104var minimumExpectedVersion = new NuGetVersion(TestContext.LatestRuntimePatchForNetCoreApp2_0); 107testProject.RuntimeFrameworkVersion, TestContext.LatestRuntimePatchForNetCoreApp2_0);
GivenThatWeWantToBuildASelfContainedApp.cs (2)
284string sdkVersionBand = GetVersionBand(TestContext.Current.ToolsetUnderTest.SdkVersion); 352Version.TryParse(TestContext.Current.ToolsetUnderTest.MSBuildVersion, out Version msbuildVersion);
GivenThatWeWantToBuildAWindowsDesktopProject.cs (1)
198var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
GivenThatWeWantToGenerateADepsFileForATool.cs (6)
96DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, toolProject.Name.ToLowerInvariant())); 97DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, ".tools", toolProject.Name.ToLowerInvariant())); 138string toolAssetsFilePath = Path.Combine(TestContext.Current.NuGetCachePath, ".tools", toolProject.Name.ToLowerInvariant(), "1.0.0", toolProject.TargetFrameworks, "project.assets.json"); 144string currentToolsetSdksPath = TestContext.Current.ToolsetUnderTest.SdksPath; 229FileName = TestContext.Current.ToolsetUnderTest.DotNetHostPath, 232TestContext.Current.AddTestEnvironmentVariables(toolCommandSpec.Environment);
GivenThatWeWantToUseAnalyzers.cs (4)
349TestContext.Current.NuGetCachePath, 351Path.Combine(TestContext.Current.ToolsetUnderTest.DotNetRoot, "packs") 358if (absolutePath.StartsWith(TestContext.Current.ToolsetUnderTest.SdksPath)) 360string path = absolutePath.Substring(TestContext.Current.ToolsetUnderTest.SdksPath.Length + 1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
WorkloadTests.cs (1)
272var sdkVersion = SemanticVersion.Parse(TestContext.Current.ToolsetUnderTest.SdkVersion);
Microsoft.NET.Clean.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Pack.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Publish.Tests (9)
GivenThatWeWantToPublishAFrameworkDependentApp.cs (1)
88Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath))
GivenThatWeWantToPublishAHelloWorldProject.cs (3)
1160CopyDirectory(Path.Combine(TestContext.Current.ToolsetUnderTest.DotNetRoot, "host"), Path.Combine(expectedRoot, "host")); 1161CopyDirectory(Path.Combine(TestContext.Current.ToolsetUnderTest.DotNetRoot, "shared", "Microsoft.NETCore.App"), Path.Combine(expectedRoot, "shared", "Microsoft.NETCore.App")); 1165expectedRoot = TestContext.Current.ToolsetUnderTest.DotNetRoot;
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (2)
175runAppCommand.Environment["DOTNET_ROOT"] = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath); 247runAppCommand.Environment["DOTNET_ROOT"] = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath);
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
PublishWebApp.cs (1)
54runAppCommand.Environment["DOTNET_ROOT"] = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath);
PublishWpfApp.cs (1)
62runAppCommand.Environment["DOTNET_ROOT"] = Path.GetDirectoryName(TestContext.Current.ToolsetUnderTest.DotNetHostPath);
Microsoft.NET.Rebuild.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Restore.Tests (21)
GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs (1)
47string toolAssetsFilePath = Path.Combine(TestContext.Current.NuGetCachePath, ".tools", toolProject.Name.ToLowerInvariant(), "99.99.99", toolProject.TargetFrameworks, "project.assets.json");
GivenThatWeWantToRestoreDotNetCliToolReference.cs (3)
53DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, toolProject.Name.ToLowerInvariant())); 54DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, ".tools", toolProject.Name.ToLowerInvariant())); 63var assetsJsonPath = Path.Combine(TestContext.Current.NuGetCachePath,
GivenThatWeWantToRestoreProjectsUsingNuGetConfigProperties.cs (10)
37var packagesFolder = Path.Combine(TestContext.Current.TestExecutionDirectory, "packages", testProjectName); 40restoreCommand.Execute($"/p:RestorePackagesPath={packagesFolder}", $"/p:_NugetFallbackFolder={TestContext.Current.NuGetFallbackFolder}").Should().Pass(); 59restoreCommand.Execute($"/p:_NugetFallbackFolder={TestContext.Current.NuGetFallbackFolder}").Should().Pass(); 74restoreCommand.Execute($"/p:_NugetFallbackFolder={TestContext.Current.NuGetFallbackFolder}", "/p:DisableImplicitNuGetFallbackFolder=true").Should().Fail(); 89var executeResult = restoreCommand.Execute($"/p:_NugetFallbackFolder={TestContext.Current.NuGetFallbackFolder}", "/p:DisableImplicit1xNuGetFallbackFolder=true"); 135TestContext.Current.NuGetFallbackFolder); 149.Execute($"/p:PackageOutputPath={TestContext.Current.NuGetFallbackFolder}").Should().Pass(); 152TestContext.Current.NuGetFallbackFolder, 153Path.Combine(TestContext.Current.NuGetFallbackFolder, $"{projectInNuGetFallbackFolder.Name}.1.0.0.nupkg")); 156DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, projectInNuGetFallbackFolder.Name.ToLowerInvariant()));
GivenThatWeWantToRestoreProjectsWithPackageDowngrades.cs (2)
27var packagesFolder = Path.Combine(TestContext.Current.TestExecutionDirectory, "packages", testProjectName); 58var packagesFolder = Path.Combine(TestContext.Current.TestExecutionDirectory, "packages", testProjectName);
GivenThatWeWantToUseFrameworkRoslyn.cs (4)
29NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 68NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 156NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); 179NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages);
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (9)
AspNetSdkBaselineTest.cs (5)
71Path.Combine(TestContext.GetRepoRoot() ?? AppContext.BaseDirectory, "test", "Microsoft.NET.Sdk.StaticWebAssets.Tests", "StaticWebAssetsBaselines"); 146GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 242GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 290GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 297var template = Templatize(actual, ProjectDirectory.Path, GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, runtimeIdentifier);
BlazorLegacyIntegrationTest60.cs (1)
17Path.Combine(TestContext.GetRepoRoot() ?? AppContext.BaseDirectory, "test", "Microsoft.NET.Sdk.BlazorWebAssembly.Tests", "StaticWebAssetsBaselines");
BlazorWasmBaselineTests.cs (1)
13Path.Combine(TestContext.GetRepoRoot() ?? AppContext.BaseDirectory, "test", "Microsoft.NET.Sdk.BlazorWebAssembly.Tests", "StaticWebAssetsBaselines");
IsolatedNuGetPackageFolderAspNetSdkBaselineTest.cs (1)
15_cachePath = Path.GetFullPath(Path.Combine(TestContext.Current.TestExecutionDirectory, Shorten(restoreNugetPackagePath)));
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.Razor.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.Razor.Tool.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.StaticWebAssets.Tests (13)
AspNetSdkBaselineTest.cs (5)
71Path.Combine(TestContext.GetRepoRoot() ?? AppContext.BaseDirectory, "test", "Microsoft.NET.Sdk.StaticWebAssets.Tests", "StaticWebAssetsBaselines"); 146GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 242GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 290GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, 297var template = Templatize(actual, ProjectDirectory.Path, GetNuGetCachePath() ?? TestContext.Current.NuGetCachePath, runtimeIdentifier);
IsolatedNuGetPackageFolderAspNetSdkBaselineTest.cs (1)
15_cachePath = Path.GetFullPath(Path.Combine(TestContext.Current.TestExecutionDirectory, Shorten(restoreNugetPackagePath)));
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
StaticWebAssets\DiscoverPrecompressedAssetsTest.cs (1)
22OutputBasePath = Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(ResolveCompressedAssetsTest));
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (2)
16Directory.CreateDirectory(Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(GenerateStaticWebAssetsManifestTest))); 17TempFilePath = Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(GenerateStaticWebAssetsManifestTest), Guid.NewGuid().ToString("N") + ".json");
StaticWebAssets\ReadStaticWebAssetsManifestFileTest.cs (2)
17Directory.CreateDirectory(Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(ReadStaticWebAssetsManifestFileTest))); 18TempFilePath = Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(ReadStaticWebAssetsManifestFileTest), Guid.NewGuid().ToString("N") + ".json");
StaticWebAssets\ResolveCompressedAssetsTest.cs (1)
26OutputBasePath = Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(ResolveCompressedAssetsTest));
Microsoft.NET.Sdk.Web.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (4)
WorkloadPackGroupTests.cs (4)
85var workloadResolver = WorkloadResolver.CreateForTests(manifestProvider, TestContext.Current.ToolsetUnderTest.DotNetRoot); 96return new(TestContext.Current.ToolsetUnderTest.DotNetRoot, TestContext.Current.ToolsetUnderTest.SdkVersion, userProfileDir: null, globalJsonPath: null); 152var workloadResolver = WorkloadResolver.CreateForTests(manifestProvider, TestContext.Current.ToolsetUnderTest.DotNetRoot);
Microsoft.NET.TestFramework (39)
Assertions\StringAssertionsExtensions.cs (2)
59if (!TestContext.IsLocalized()) 75if (!TestContext.IsLocalized())
Attributes\CoreMSBuildAndWindowsOnlyFactAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\CoreMSBuildAndWindowsOnlyTheoryAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\CoreMSBuildOnlyFactAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild)
Attributes\CoreMSBuildOnlyTheoryAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild)
Attributes\FullMSBuildOnlyFactAttribute.cs (1)
10if (!TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild)
Attributes\FullMSBuildOnlyTheoryAttribute.cs (1)
10if (!TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild)
Attributes\RequiresMSBuildVersionTheoryAttribute.cs (3)
20if (!Version.TryParse(TestContext.Current.ToolsetUnderTest.MSBuildVersion, out Version? msbuildVersion)) 22attribute.Skip = $"Failed to determine the version of MSBuild ({TestContext.Current.ToolsetUnderTest.MSBuildVersion})."; 32attribute.Skip = $"This test requires MSBuild version {version} to run (using {TestContext.Current.ToolsetUnderTest.MSBuildVersion}).";
Commands\DotnetCommand.cs (2)
17FileName = TestContext.Current.ToolsetUnderTest.DotNetHostPath, 21TestContext.Current.AddTestEnvironmentVariables(sdkCommandSpec.Environment);
Commands\GetValuesCommand.cs (1)
142return TestContext.Current.ToolsetUnderTest.CreateCommandForTarget(TargetName, newArgs);
Commands\MSBuildCommand.cs (1)
168return TestContext.Current.ToolsetUnderTest.CreateCommandForTarget(Target, newArgs);
Commands\MSBuildVersionCommand.cs (3)
12if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild) 16FileName = TestContext.Current.ToolsetUnderTest.FullFrameworkMSBuildPath, 25FileName = TestContext.Current.ToolsetUnderTest.DotNetHostPath,
Commands\NuGetExeRestoreCommand.cs (4)
27if (string.IsNullOrEmpty(TestContext.Current.NuGetExePath)) 32var nugetExePath = TestContext.Current.NuGetExePath; 69PackagesDirectory ?? TestContext.Current.NuGetCachePath ?? string.Empty, 74TestContext.Current.AddTestEnvironmentVariables(ret.Environment);
Commands\RunExeCommand.cs (1)
29TestContext.Current.AddTestEnvironmentVariables(sdkCommandSpec.Environment);
SdkTest.cs (1)
10protected bool? UsingFullFrameworkMSBuild => TestContext.Current.ToolsetUnderTest?.ShouldUseFullFrameworkMSBuild;
TestAssetsManager.cs (5)
19var testAssetsDirectory = TestContext.Current.TestAssetsDirectory; 49var testAsset = new TestAsset(testProjectDirectory, testDestinationDirectory, TestContext.Current.SdkVersion, Log); 128var testAsset = new TestAsset(testDestinationDirectory, TestContext.Current.SdkVersion, Log); 154return new TestDirectory(dir, TestContext.Current.SdkVersion); 180baseDirectory ??= TestContext.Current.TestExecutionDirectory;
TestCommandLine.cs (1)
291TestContext.Initialize(commandLine);
TestContext.cs (4)
80private static TestContext? _current; 82public static TestContext Current 104string dotnetRoot = TestContext.Current.ToolsetUnderTest.DotNetRoot; 150TestContext testContext = new();
TestDirectory.cs (2)
22return new TestDirectory(path, TestContext.Current.SdkVersion); 53TestContext.WriteGlobalJson(path, sdkVersion);
ToolsetInfo.cs (3)
96WorkingDirectory = TestContext.Current.TestExecutionDirectory 119WorkingDirectory = TestContext.Current.TestExecutionDirectory 245TestContext.Current.AddTestEnvironmentVariables(ret.Environment);
Microsoft.NET.ToolPack.Tests (2)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (1)
142string shimoutputPath = Path.Combine(TestContext.Current.TestExecutionDirectory, "shimoutput");
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.TemplateEngine.Cli.UnitTests (3)
BaseTest.cs (2)
11public static string DotnetNewTestAssets { get; } = VerifyExists(Path.Combine(TestContext.Current.TestAssetsDirectory, "TestPackages", "dotnet-new")); 58string repoRoot = Path.GetFullPath(Path.Combine(TestContext.Current.TestAssetsDirectory, "..", ".."));
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
Microsoft.WebTools.AspireService.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
msbuild.Integration.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
System.CommandLine.StaticCompletions.Tests (1)
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));
trustedroots.Tests (2)
CtlFileTests.cs (1)
16TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest,
Program.cs (1)
70var testDirectory = TestDirectory.Create(Path.Combine(TestContext.Current.TestExecutionDirectory, "sdkinfo"));