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

ExcludeFromCodeCoverage in generated code breaks net20 targets #456

Closed
AArnott opened this issue Mar 28, 2020 · 8 comments
Closed

ExcludeFromCodeCoverage in generated code breaks net20 targets #456

AArnott opened this issue Mar 28, 2020 · 8 comments
Labels

Comments

@AArnott
Copy link
Collaborator

AArnott commented Mar 28, 2020

As @amis92 identifies in AArnott/CodeGeneration.Roslyn#198 (comment)

@AArnott
Copy link
Collaborator Author

AArnott commented Mar 28, 2020

@amis92 Why is net20 an interesting target for your use case at this point?

@amis92
Copy link
Contributor

amis92 commented Mar 28, 2020

TBH I have no idea whatsoever who can need that. It just always were one of the targets for the Attributes package. I might have gotten a question for net35 support at some point though. 🤷‍♂️

@AArnott
Copy link
Collaborator Author

AArnott commented Mar 29, 2020

Ok, well, since we support multiple languages (C#, F#, VB), changing the condition's isn't particularly as easy as it might sound. So I'd rather not go to the trouble if it isn't warranted. I suggest we cut net20 support from CG.R.

@lamronby
Copy link

For what it's worth, it's not just net20 targets - it's all .net versions prior to 4: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.excludefromcodecoverageattribute?view=netframework-4.5#moniker-applies-to

@rseanhall
Copy link

WiX v4 is using Nerdbank.GitVersioning. Thanks for this library.

There are two cases where we're still targeting net20 - DTF and Managed Bootstrapper Applications. DTF is the managed wrapper around many Win32 API's around MSI's and is used extensively by custom actions. Managed BA's are the user's code in WiX's bootstrapper (Burn). In both cases, our users may still be targeting versions of Windows that does not have .NET 4.x (even though those versions of Windows are no longer supported by Microsoft). I might be able to help if you're still interested in supporting net20.

@AArnott
Copy link
Collaborator Author

AArnott commented Jul 19, 2020

Thanks for offering help, @rseanhall. What if you just set the property to disable ThisAssembly code generation for these net20 projects? Do you need it?

@rseanhall
Copy link

We're not using the ThisAssembly class, so if we can disable that code generation then that would work.

@AArnott
Copy link
Collaborator Author

AArnott commented Jul 21, 2020

@rseanhall #292 tracked making ThisAssembly a suppressible feature. If you wanted to contribute, I think I'd prefer 'fixing' that issue rather than this one, if it's all the same to you.

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

No branches or pull requests

4 participants