[Feature Request]: warn if a pack-target assembly property is set but GenerateAssemblyInfo is False
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Summary
Add a warning to help users diagnose a scenario where setting assembly properties is getting "ignored".
### Background and Motivation
As a scenario: a large legacy solution has been migrated to the .SDK format, and in some obscure project(s) a previous developer has set `GenerateAssemblyInfo` to False so that an AssemblyInfo.cs file is being used.
At a later time a different developer sets Assembly-related properties via dotnet/msbuild CLI args or Directory.Build.props, and cannot figure out why those properties are getting ignored for some projects. There's no warning printed to the command line, and even creating a binlog and loading it into the binlog viewer doesn't give any hints about why the property settings are getting "ignored" for those assemblies.
### Proposed Feature
If `GenerateAssemblyInfo` is false, then emit a warning if any [pack-target properties](https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target) are set.
(I suppose this would also apply to any of the individual GenerateAssembly*Attribute properties, but that might be getting into pretty rare scenarios 🤷)
### Alternative Designs
?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.