datacute / EmbeddedResourcePropertyGenerator

Generates properties for embedded resources in a project.
MIT License
0 stars 0 forks source link

Please deploy also attributes to nuget #1

Open ignatandrei opened 1 month ago

ignatandrei commented 1 month ago

I saw your project and I wanted to add to my list of Roslyn Source Code Generators

https://ignatandrei.github.io/RSCG_Examples/v2/

However, when trying to make an example, it is missing the EmbeddedResourcePropertyGenerator.Attributes

Please see the attached project EmbedRes.zip

datacute commented 1 month ago

Thanks for trying it out.

What are you using for a development environment?

Your project works ok for me, though I've possibly got a local cache with a different "alpha.4" version

I need to add to my Readme file a reference to Andrew Lock's series on Source Generators. I used the technique described in https://andrewlock.net/creating-a-source-generator-part-8-solving-the-source-generator-marker-attribute-problem-part2/ to include the attribute dll in the package.

The generated code doesn't need the attribute dll, and to allow usage of it to be removed from the output, I added the ConditionalAttribute. However I accidentally missed that ConditionalAttribute out of alpha.4, where I changed from generating the attribute, to including it as a dll. I've also realised that users will also be missing the helpful doc comments that I included on the attribute: https://github.com/datacute/EmbeddedResourcePropertyGenerator/blob/alpha/EmbeddedResourcePropertyGenerator.Attributes/EmbeddedResourcePropertiesAttribute.cs

ignatandrei commented 1 month ago

I am using Visual Studio for development.
I do not understand yet how we can identify if the problem is with my code or your cache. Could you deploy a new version JUST on nuget , without having on local cache, then updating my project to the new version ?

datacute commented 1 month ago

v0.0.1-alpha.5 is now available

datacute commented 1 month ago

I was just now creating a github action to build & test, and the tests were failing when running on linux, due to no files being found. I've been developing on Windows.

ignatandrei commented 1 month ago

From my experience, does not matter if Windows or Linux.