-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add source generator to emit supporting attribute types #181
Add source generator to emit supporting attribute types #181
Conversation
@Sergio0694 Thanks for the help here. I think we need to update to .NET 7 so we can use C# 11. Also, I think the pseudo package is busted. I tried to update it, but the analyzer isn't being chained in as expected. I tried to manually load it in the |
I've updated the .NET SDK pulled in from the CI script to be .NET 7 👍 |
3997e8e
to
79e5e09
Compare
e1b7eba
to
889f8c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a note in the readme about when users may need to define those types.
Import new targets file using DNNE.targets
Closes #168
Overview
This PR includes a new
dnne-analyzers
project, bundling (for now) a generator that produces the supporting attribute types. The setup is pretty much the same as that used in ComputeSharp, the MVVM Toolkit, and several other generators. We have the generator project, a bundled .targets file that is included in the NuGet package that ensures analyzers are either loaded correctly or otherwise produces useful warnings for users, and then some basic props to build and pack the analyzer.