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

optional ThisAssembly generation #292

Closed
japj opened this issue Feb 1, 2019 · 5 comments · Fixed by #472
Closed

optional ThisAssembly generation #292

japj opened this issue Feb 1, 2019 · 5 comments · Fixed by #472

Comments

@japj
Copy link
Contributor

japj commented Feb 1, 2019

Is it possible to (optionally) turn off the generation of the ThisAssembly class?

We had a situation where we hit an issue in combination with Fakes generation that took me a while to figure out. (this was eventually solved by adding <Remove TypeName="ThisAssembly"/> in the fakes config).

However, I am not sure if anyone has experienced issues where another library actually generates ThisAssembly content that would conflict with this library.
In that case they would also benefit from a 'switch' to turn it off.

@AArnott
Copy link
Collaborator

AArnott commented Feb 1, 2019

I would accept a PR for this. Here's a mini-spec of how I would want it:

An msbuild property that turns it off. It should be called GenerateThisAssemblyClass, and passed into the AssemblyVersionInfo task. It should have a default value of true, set either in a (new) .props file or at the top of the .targets file, conditional on it not already having been set.

@AArnott
Copy link
Collaborator

AArnott commented Dec 20, 2019

Closing due to a workaround being available or lack of popular demand. This allows us to better focus on high impact issues. If you feel this is blocking you, you may add a comment here to explain why this should be prioritized.

Thank you for your understanding.

@AArnott
Copy link
Collaborator

AArnott commented Jul 23, 2020

Oops. This actually did get fixed in #472

@maniglia
Copy link
Contributor

I would like to use this feature to suppress ThisAssembly class generation, how can I do?
If I enter this: <NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass> in my project, is that enough?

@AArnott
Copy link
Collaborator

AArnott commented Mar 30, 2023

Yes

AArnott pushed a commit that referenced this issue Oct 9, 2024
Bumps [dotnet-coverage](https://github.com/microsoft/codecoverage) from 17.12.4 to 17.12.5.
- [Commits](https://github.com/microsoft/codecoverage/commits)

---
updated-dependencies:
- dependency-name: dotnet-coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants