Open AraHaan opened 2 years ago
Is NuGet the right distribution mechanism for this? Should this just be part of the SDK?
Either one could work, yeah (or both for those using the .NET 6 SDK like me with their codes and need the generator from this repo).
I think that the SDK would actually be better since I now see the package is gone from nuget.org now.
I can only find it in the dotnet6 feed, however it's an 3.3.3-beta version that has not been updated since 2021.
Do we want to rewrite it as an incremental generator (and require 4.x the package)?
If it becomes built into the .NET SDK I think rewriting it to make it incremental would be a must.
Bonus Points: If there could be support added for reading binary resources as byte[]
and then anyone needing to read them into things like Icon
or Image
would have to make the conversion themselves (which would be a small price to pay to allow loading of binary resources cross platform).
As mentioned in #5521, it would be helpful if there is also a nullable-enabled replacement for PublicResXFileCodeGenerator
. As of now, it seems that Microsoft.CodeAnalysis.ResxSourceGenerator cannot produce public
properties but there are fairly common scenarios where this is needed.
So either make Microsoft.CodeAnalysis.ResxSourceGenerator configurable or add a Microsoft.CodeAnalysis.PublicResxSourceGenerator.
It's currently being published to the dotnet8 feed. I don't have an idea for when it would appear on nuget.org.
it seems that Microsoft.CodeAnalysis.ResxSourceGenerator cannot produce public properties
Can you file a separate issue for this?
Honestly to nuget.org or to the .NET SDK as a built in source generator would work as well (or better yet do both so non-SDK style projects can use them as well in VS2022).
In a world where nullability is enabled by default it feels somewhat archaic to use these old ResxGenerator
and PublicResxGenerator
that produce code without any nullability annotations.
There should be a way to generate nullable annotated resources that is as easy as it now with the old ones.
It would be nice if Microsoft.CodeAnalysis.ResxSourceGenerator was available in nuget.org so projects that do not want to add the
dotnet7
or thedotnet-tools
feeds can still use the generator.