Declare internal source attributes in consuming projects#218
Declare internal source attributes in consuming projects#218jnm2 wants to merge 3 commits intoDotNetAnalyzers:masterfrom
Conversation
|
This looks perfect! |
|
@JohanLarsson We need to test this in a WPF project because I think it will suffer from the same issue as tunnelvisionlabs/ReferenceAssemblyAnnotator#81. |
jeremyVignelles
left a comment
There was a problem hiding this comment.
Sorry, I didn't see that you implemented it :)
I'm ok with the set, with a few remarks
|
For your remark about WPF, I don't know if that can be an issue. I'd think that the way both package work are quite different. |
The problem with WPF is only related to including a source file into the project. I.e. it's related to added Specifically, the problem is that the .targets file is not included in the WPF temp project and so |
|
Good news, I found an easy fix to work around the WPF problem. https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/pull/82/files#diff-e981fad1d30fcb8e912da7c14997e6caR20 |
|
Closing since this PR was mainly a demonstration. If you'd like to take this approach in the future, this can serve as a reference. |
Alternative to the approach taken in #130
I tested the nupkg and was able to use the attributes in a new console project just by referencing the package. When I added
<IncludeOwnershipAttributes>false</IncludeOwnershipAttributes>to the csproj, the attributes were no longer declared.Resulting package file structure: