8 types derived from MSBuildCommand
Microsoft.NET.TestFramework (8)
Commands\BuildCommand.cs (1)
8public sealed class BuildCommand : MSBuildCommand
Commands\CleanCommand.cs (1)
6public sealed class CleanCommand : MSBuildCommand
Commands\ComposeStoreCommand.cs (1)
13public sealed class ComposeStoreCommand : MSBuildCommand
Commands\GetValuesCommand.cs (1)
6public sealed class GetValuesCommand : MSBuildCommand
Commands\PackCommand.cs (1)
6public sealed class PackCommand : MSBuildCommand
Commands\PublishCommand.cs (1)
8public sealed class PublishCommand : MSBuildCommand
Commands\RebuildCommand.cs (1)
6public sealed class RebuildCommand : MSBuildCommand
Commands\RestoreCommand.cs (1)
8public sealed class RestoreCommand : MSBuildCommand
36 instantiations of MSBuildCommand
dotnet.Tests (2)
CommandTests\MSBuild\GivenDotnetMSBuildBuildsProjects.cs (2)
26new MSBuildCommand(Log, "SayHello", testProjectDirectory) 33new MSBuildCommand(Log, "SayGoodbye", testProjectDirectory)
Microsoft.NET.Build.Tests (24)
DesignTimeBuildTests.cs (3)
46var command = new MSBuildCommand(Log, "ResolveAssemblyReferencesDesignTime", projectDirectory) 94new MSBuildCommand(testAsset, "ResolvePackageDependenciesDesignTime") 221var buildCommand = new MSBuildCommand(Log, null, projectFolder)
EvaluatorFastPathTests.cs (1)
19var command = new MSBuildCommand(testAsset, string.Empty);
GivenFrameworkReferences.cs (1)
1129var command = new MSBuildCommand(testAsset, "WriteResolvedVersions");
GivenThatWeWantToBuildACrossTargetedLibrary.cs (1)
139new MSBuildCommand(testAsset, "GetOutputPath")
GivenThatWeWantToBuildADesktopLibrary.cs (1)
488var msbuildBuildCommand = new MSBuildCommand(Log, "Build", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAnAppWithLibrary.cs (1)
154var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAnAppWithSharedProject.cs (1)
19var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "TestApp");
GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs (1)
86var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAppsWithFrameworkRefs.cs (1)
95var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToCollectExceptionTelemetry.cs (1)
28var mSBuildCommand = new MSBuildCommand(Log, "GenerateToolsSettingsFileFromBuildProperty", Path.Combine(testAsset.TestRoot));
GivenThatWeWantToGenerateADepsFileForATool.cs (1)
189var generateDepsCommand = new MSBuildCommand(Log, "BuildDepsJson", generateDepsProjectDirectoryPath, generateDepsProjectFileName);
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (1)
33var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "LinkTest");
GivenThatWeWantToResolveConflicts.cs (2)
436var getItemsCommand1 = new MSBuildCommand(testAsset, "AddPrunePackageReferences"); 442var getItemsCommand2 = new MSBuildCommand(testAsset, "ResolvePackageAssets;AddTransitiveFrameworkReferences;AddPrunePackageReferences");
GivenThatWeWantToResolveRuntimePackAssets.cs (2)
33var command = new MSBuildCommand( 75var command = new MSBuildCommand(
GivenThatWeWantToRunFromMSBuildTarget.cs (1)
30var runTargetCommand = new MSBuildCommand(Log, "run", Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToUseContentFiles.cs (4)
85var cleanCmd = new MSBuildCommand(asset, "Clean"); 90var rebuildCmd = new MSBuildCommand(asset, "ReBuild"); 95rebuildCmd = new MSBuildCommand(asset, "ReBuild"); 100cleanCmd = new MSBuildCommand(asset, "Clean");
RoslynBuildTaskTests.cs (1)
134var buildCommand = new MSBuildCommand(testAsset, "Build");
Microsoft.NET.Clean.Tests (1)
GivenThatWeWantToCleanAProject.cs (1)
72var cleanAndBuildCommand = new MSBuildCommand(Log, "Clean;Build", testAsset.TestRoot);
Microsoft.NET.Restore.Tests (1)
GivenThatWeWantToUseFrameworkRoslyn.cs (1)
160var command = (MSBuildCommand)new MSBuildCommand(testAsset, "Restore;Build")
Microsoft.NET.Sdk.Razor.Tests (7)
BuildIntrospectionTest.cs (2)
102var build = new MSBuildCommand(Log, "_IntrospectWatchItems", projectDirectory.Path); 118var build = new MSBuildCommand(Log, "_IntrospectRazorGenerateComponentDesignTime", projectDirectory.Path);
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 (1)
69var clean = new MSBuildCommand(Log, "Clean", build.FullPathProjectFile);
PackIntegrationTest.cs (1)
22var pack = new MSBuildCommand(projectDirectory, "Pack");
Microsoft.NET.Sdk.StaticWebAssets.Tests (1)
StaticWebAssetsDesignTimeTest.cs (1)
128return (MSBuildCommand)new MSBuildCommand(testAsset.Log, targets, testAsset.TestRoot, relativeProjectPath)
41 references to MSBuildCommand
Microsoft.NET.Build.Tests (20)
DesignTimeBuildTests.cs (2)
46var command = new MSBuildCommand(Log, "ResolveAssemblyReferencesDesignTime", projectDirectory) 221var buildCommand = new MSBuildCommand(Log, null, projectFolder)
EvaluatorFastPathTests.cs (1)
19var command = new MSBuildCommand(testAsset, string.Empty);
GivenFrameworkReferences.cs (1)
1129var command = new MSBuildCommand(testAsset, "WriteResolvedVersions");
GivenThatWeWantToBuildADesktopLibrary.cs (1)
488var msbuildBuildCommand = new MSBuildCommand(Log, "Build", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAnAppWithLibrary.cs (1)
154var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAnAppWithSharedProject.cs (1)
19var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "TestApp");
GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs (1)
86var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToBuildAppsWithFrameworkRefs.cs (1)
95var cleanCommand = new MSBuildCommand(Log, "Clean", buildCommand.FullPathProjectFile);
GivenThatWeWantToCollectExceptionTelemetry.cs (1)
28var mSBuildCommand = new MSBuildCommand(Log, "GenerateToolsSettingsFileFromBuildProperty", Path.Combine(testAsset.TestRoot));
GivenThatWeWantToGenerateADepsFileForATool.cs (1)
189var generateDepsCommand = new MSBuildCommand(Log, "BuildDepsJson", generateDepsProjectDirectoryPath, generateDepsProjectFileName);
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (1)
33var command = new MSBuildCommand(Log, "WriteItems", testAsset.TestRoot, "LinkTest");
GivenThatWeWantToResolveConflicts.cs (2)
436var getItemsCommand1 = new MSBuildCommand(testAsset, "AddPrunePackageReferences"); 442var getItemsCommand2 = new MSBuildCommand(testAsset, "ResolvePackageAssets;AddTransitiveFrameworkReferences;AddPrunePackageReferences");
GivenThatWeWantToResolveRuntimePackAssets.cs (2)
33var command = new MSBuildCommand( 75var command = new MSBuildCommand(
GivenThatWeWantToRunFromMSBuildTarget.cs (1)
30var runTargetCommand = new MSBuildCommand(Log, "run", Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToUseContentFiles.cs (2)
85var cleanCmd = new MSBuildCommand(asset, "Clean"); 90var rebuildCmd = new MSBuildCommand(asset, "ReBuild");
RoslynBuildTaskTests.cs (1)
134var buildCommand = new MSBuildCommand(testAsset, "Build");
Microsoft.NET.Clean.Tests (1)
GivenThatWeWantToCleanAProject.cs (1)
72var cleanAndBuildCommand = new MSBuildCommand(Log, "Clean;Build", testAsset.TestRoot);
Microsoft.NET.Publish.Tests (3)
GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs (1)
215MSBuildCommand command;
GivenThatWeWantToPublishAProjectWithAllFeatures.cs (2)
173private static List<(string, DateTime)> GetLastWriteTimesUtc(MSBuildCommand command, params string[] searchPatterns) 180private static IEnumerable<string> EnumerateFiles(MSBuildCommand command, params string[] searchPatterns)
Microsoft.NET.Restore.Tests (2)
GivenThatWeWantToUseFrameworkRoslyn.cs (2)
160var command = (MSBuildCommand)new MSBuildCommand(testAsset, "Restore;Build")
Microsoft.NET.Sdk.Razor.Tests (7)
BuildIntrospectionTest.cs (2)
102var build = new MSBuildCommand(Log, "_IntrospectWatchItems", projectDirectory.Path); 118var build = new MSBuildCommand(Log, "_IntrospectRazorGenerateComponentDesignTime", projectDirectory.Path);
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 (1)
69var clean = new MSBuildCommand(Log, "Clean", build.FullPathProjectFile);
PackIntegrationTest.cs (1)
22var pack = new MSBuildCommand(projectDirectory, "Pack");
Microsoft.NET.Sdk.StaticWebAssets.Tests (5)
StaticWebAssetsDesignTimeTest.cs (5)
35var msbuild = CreateMSBuildCommand( 71var msbuild = CreateMSBuildCommand( 105var msbuild = CreateMSBuildCommand( 126private static MSBuildCommand CreateMSBuildCommand(TestAsset testAsset, string relativeProjectPath, string targets) 128return (MSBuildCommand)new MSBuildCommand(testAsset.Log, targets, testAsset.TestRoot, relativeProjectPath)
Microsoft.NET.TestFramework (3)
AspNetSdkTest.cs (2)
152protected virtual CommandResult ExecuteCommandWithoutRestore(MSBuildCommand command, params string[] arguments) 181private void ApplyDefaults(MSBuildCommand command)
Commands\NuGetExeRestoreCommand.cs (1)
22ProjectFile = MSBuildCommand.FindProjectFile(ref _projectRootPath, relativePathToProject);