Skip to content

MSBuild locator warning should not prescribe PrivateAssets="all" #368

Description

The new check for ExcludeAssets="compile" is fine, but the error message shouldn't tell the user to set PrivateAssets="all" when in fact only PrivateAssets="runtime" is required, since that can introduce build breaks in referencing packages/projects due to a missing reference assembly to msbuild packages.

Text="A PackageReference to the package '%(_DistinctMSBuildPackagesReferencedPoorly.NuGetPackageId)' at version '%(_DistinctMSBuildPackagesReferencedPoorly.NuGetPackageVersion)' is present in this project without ExcludeAssets="runtime" and PrivateAssets="all" set. This can cause errors at run-time due to MSBuild assembly-loading."

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions