Skip to content

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

@AArnott

Description

@AArnott

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."

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