-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a mechanism to control the AssemblyFileVersion independently from AssemblyVersion in MsBuild? #1450
Comments
You can set the properties So a sample project file could contain for example: <PropertyGroup>
<!-- Set VersionPrefix instead of Version to allow a suffix to be added by CI builds -->
<VersionPrefix>1.2.3</VersionPrefix>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>$(VersionPrefix)</FileVersion>
</PropertyGroup> |
@dasMulli - Many thanks :) |
Is it possible to disable the generation only of some parameters (those winch control versions) since a separate AssemblyInfo.cs is generated as part of my build? So I'm either turning off the generation of all attributes (those which control names) or I have only versions and rest are blank. |
Yes each attribute can be controlled individually by setting <PropertyGroup>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup> The pattern is |
Awesome, thanks! |
…0200511.11 (dotnet#1450) - Microsoft.AspNetCore.Analyzers: 5.0.0-preview.5.20260.1 -> 5.0.0-preview.6.20261.11 - Microsoft.AspNetCore.Mvc.Analyzers: 5.0.0-preview.5.20260.1 -> 5.0.0-preview.6.20261.11 - Microsoft.AspNetCore.Components.Analyzers: 5.0.0-preview.5.20260.1 -> 5.0.0-preview.6.20261.11 - Microsoft.AspNetCore.Mvc.Api.Analyzers: 5.0.0-preview.5.20260.1 -> 5.0.0-preview.6.20261.11 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Hi
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:
Is there a tidy way we can achieve this without adding an AssemblyInfo.cs?
Thanks
The text was updated successfully, but these errors were encountered: