-
Notifications
You must be signed in to change notification settings - Fork 1
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
Source Generated Keys Dont Work Via NuGet #27
Comments
Looks like this is to do with caching, i noticed this issue when installing Mocale in an external codebase which had never been setup before. Whilst visual studio was open, deleting bin / obj, restoring and building did not work, I believe this is because source generators get cached by visual studio, the solution was:
If anyone experiences this issue, please try these steps otherwise we can reopen this issue and investigate further |
Reopening as this issue suddenly emerged after i closed this issue... 🤦♂️ On windows i get the following message:
This is potentially an authoring issue with the generator |
Here is a sample that appears to be working, interestingly my work project doesnt work but file -> new projects do, hopefully this is a caching issue and not a compatibility issue. Closing issue for now, hopefully the cache expires and i get a working project. If i find anything I will reopen this issue |
The sample project works when referencing the source generator project directly however it fails to work when referencing via nuget.
Viewing the generated class in visual studio shows the correctly generated class, interestingly at runtime (after removing references) the type exists but has no values.
This is probably just to do with the compilation order and i will need to investigate adding targets to the generator so that it runs at the right time during compilation.
The text was updated successfully, but these errors were encountered: