Is there a mechanism to control the AssemblyFileVersion independently from AssemblyVersion in MsBuild?
See original GitHub issueHi
We are trying to save consumer frameworks and users the hassle of having to add assembly binding redirects when they upgrade minor/patch versions of Castle Core used as transitive dependencies. The issue where we are exploring this is here.
In summary this is what we landed on:
@stakx -> This line in Microsoft.NET.GenerateAssemblyInfo.targets suggests that it might be possible to add a
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
to the .csproj, then define that attribute manually. I haven’t tried it myself, though. (If that doesn’t work, then try the much coarser-grained<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
. I’ve used this before and it works, but it means you might then have to keep certain attributes in Castle.Core.csproj and AssemblyInfo.cs in sync manually.)
Is there a tidy way we can achieve this without adding an AssemblyInfo.cs?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Yes each attribute can be controlled individually by setting
The pattern is
Generate{AttributeName}Attribute
, if you don’t mind reading msbuild code the full list is here.@dasMulli - Many thanks 😃