Skip to content

Set properties to disable symbols and Visual Studio fast up-to-date check#343

Merged
jeffkl merged 3 commits intomicrosoft:mainfrom
CodeCyclone:main
May 5, 2022
Merged

Set properties to disable symbols and Visual Studio fast up-to-date check#343
jeffkl merged 3 commits intomicrosoft:mainfrom
CodeCyclone:main

Conversation

@CodeCyclone
Copy link
Contributor

Updates to NoTargets SDK props:

  • Set properties to indicate NoTargets projects don't generate symbols
  • Disable VS Fast Up-to-date Check for NoTargets SDK projects and rely on MSBuild

Documentation regarding Visual Studio's Up-to-date Check:
https://github.com/dotnet/project-system/blob/main/docs/up-to-date-check.md#disabling-the-up-to-date-check

Copy link
Contributor

@jeffkl jeffkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this unit test to check for the expected defaults in case anything ever messes with these properties

[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")]
public void PropertiesHaveExpectedValues(string propertyName, string expectedValue)
{
ProjectCreator.Templates.NoTargetsProject(
path: GetTempFileWithExtension(".csproj"))
.Save()
.TryGetPropertyValue(propertyName, out string actualValue);
actualValue.ShouldBe(expectedValue, StringComparer.OrdinalIgnoreCase, customMessage: $"Property {propertyName} should have a value of \"{expectedValue}\" but its value was \"{actualValue}\"");
}

@jeffkl jeffkl changed the title NoTargets SDK: Set properties to disable Symbols and disable VS Fast Up-to-date Check Set properties to disable symbols and Visual Studio fast up-to-date check Mar 7, 2022
@jeffkl jeffkl self-assigned this May 5, 2022
Copy link
Contributor

@jeffkl jeffkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, I went ahead and pushed an update to the unit test so I get merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments