diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00e3b1fb..9982dd10 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ variables: BuildConfiguration: 'Debug' BuildPlatform: 'Any CPU' DotNet3Version: '3.x' - DotNet6Version: '6.x' + DotNet6Version: '6.0.203' MSBuildArgs: '"/p:Platform=$(BuildPlatform)" "/p:Configuration=$(BuildConfiguration)" "/BinaryLogger:$(Build.SourcesDirectory)\$(ArtifactsDirectoryName)\msbuild.binlog"' SignType: 'Test' diff --git a/src/NoTargets.UnitTests/NoTargetsTests.cs b/src/NoTargets.UnitTests/NoTargetsTests.cs index 214e68b4..d54e2c69 100644 --- a/src/NoTargets.UnitTests/NoTargetsTests.cs +++ b/src/NoTargets.UnitTests/NoTargetsTests.cs @@ -155,23 +155,37 @@ public void ProjectsCanDependOnNoTargetsProjects() } [Theory] - [InlineData("DisableImplicitFrameworkReferences", "true")] - [InlineData("EnableDefaultCompileItems", "false")] - [InlineData("EnableDefaultEmbeddedResourceItems", "false")] - [InlineData("GenerateAssemblyInfo", "false")] - [InlineData("GenerateMSBuildEditorConfigFile", "false")] - [InlineData("IncludeBuildOutput", "false")] - [InlineData("ProduceReferenceAssembly", "false")] - [InlineData("SkipCopyBuildProduct", "true")] - [InlineData("AutomaticallyUseReferenceAssemblyPackages", "false")] - [InlineData("NoCompilerStandardLib", "false")] - [InlineData("DebugType", "None")] - [InlineData("DebugSymbols", "false")] - [InlineData("DisableFastUpToDateCheck", "true")] - public void PropertiesHaveExpectedValues(string propertyName, string expectedValue) + [InlineData("AutomaticallyUseReferenceAssemblyPackages", "true", "true")] + [InlineData("AutomaticallyUseReferenceAssemblyPackages", null, "false")] + [InlineData("DebugSymbols", "true", "false")] + [InlineData("DebugSymbols", null, "false")] + [InlineData("DebugType", "Full", "None")] + [InlineData("DebugType", null, "None")] + [InlineData("DisableFastUpToDateCheck", "false", "false")] + [InlineData("DisableFastUpToDateCheck", null, "true")] + [InlineData("DisableImplicitFrameworkReferences", "false", "false")] + [InlineData("DisableImplicitFrameworkReferences", null, "true")] + [InlineData("EnableDefaultCompileItems", "true", "true")] + [InlineData("EnableDefaultCompileItems", null, "false")] + [InlineData("EnableDefaultEmbeddedResourceItems", "true", "true")] + [InlineData("EnableDefaultEmbeddedResourceItems", null, "false")] + [InlineData("GenerateAssemblyInfo", "true", "true")] + [InlineData("GenerateAssemblyInfo", null, "false")] + [InlineData("GenerateMSBuildEditorConfigFile", "true", "true")] + [InlineData("GenerateMSBuildEditorConfigFile", null, "false")] + [InlineData("IncludeBuildOutput", "true", "true")] + [InlineData("IncludeBuildOutput", null, "false")] + [InlineData("NoCompilerStandardLib", "true", "true")] + [InlineData("NoCompilerStandardLib", null, "false")] + [InlineData("ProduceReferenceAssembly", "true", "false")] + [InlineData("ProduceReferenceAssembly", null, "false")] + [InlineData("SkipCopyBuildProduct", "false", "false")] + [InlineData("SkipCopyBuildProduct", null, "true")] + public void PropertiesHaveExpectedValues(string propertyName, string value, string expectedValue) { ProjectCreator.Templates.NoTargetsProject( path: GetTempFileWithExtension(".csproj")) + .Property(propertyName, value) .Save() .TryGetPropertyValue(propertyName, out string actualValue); diff --git a/src/NoTargets/Sdk/Sdk.props b/src/NoTargets/Sdk/Sdk.props index 833b3531..20d2b2c1 100644 --- a/src/NoTargets/Sdk/Sdk.props +++ b/src/NoTargets/Sdk/Sdk.props @@ -53,10 +53,6 @@ false false - - None - false - true diff --git a/src/NoTargets/Sdk/Sdk.targets b/src/NoTargets/Sdk/Sdk.targets index dbc8809c..793725fd 100644 --- a/src/NoTargets/Sdk/Sdk.targets +++ b/src/NoTargets/Sdk/Sdk.targets @@ -29,25 +29,7 @@ - - false - - - - - - - - - - - - - - - + BuildOnlySettings; PrepareForBuild; @@ -59,8 +41,23 @@ IncrementalClean; PostBuildEvent + + + None + false + + + false + + + + + + + +