Skip to content
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

[Docs] Recommend disabling GenerateAssemblyFileVersionAttribute MSBuild prop #2841

Merged
merged 3 commits into from
Sep 4, 2021

Conversation

BinToss
Copy link
Contributor

@BinToss BinToss commented Sep 3, 2021

Description

By default, DotNet SDK-style projects will generate all assembly info with or without assemblyinfo.cs.
The only

Related Issue

Closes #2840

Motivation and Context

After upgrading a .NET Framework project to build with the DotNet SDK whilst still targetting net4.6.2, I had run into a build error which was easily traced to a conflict with GitVersion's assembly info.

How Has This Been Tested?

Trial and error and hours of scouring MS Docs until I narrowed down the minimal changes needed to resolve the build error.
HaloSPV3/HXE@c3267e0
https://gist.github.com/BinToss/334f5bd8677a7e27fa2e1848d5eb7c53#file-output-log-L2575-L2579

Screenshots (if appropriate):

If NOT <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
image

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@asbjornu

1. I'm unsure which header this should go under. Suggestions are welcome.
2. I didn't have much time to test them, but I can confirm that adding these to my project resolved certain build errors. Those errors were caused by the build tools generating an AssemblyInfo.g.cs that overwrote or conflicted with GitVersion's generated AssemblyInfo.g.cs.
Co-authored-by: Asbjørn Ulsberg <[email protected]>
@asbjornu asbjornu merged commit c9db22b into GitTools:main Sep 4, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2021

Thank you @BinToss for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] conflict with GenerateAssemblyFileVersionAttribute MSBuild prop
2 participants