Closed frg2089 closed 2 months ago
Even if I did that, the package would still target netstandard2.0
, which would make it unusable for .NET Framework 4.0, correct?
Even if I did that, the package would still target
netstandard2.0
, which would make it unusable for .NET Framework 4.0, correct?
In fact, a Nuget package reference should be added using something like this.
<PackageReference Include="Lombok.NET" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>analyzers</IncludeAssets>
</PackageReference>
This will make them work on .Net Framework 4.0
Sounds like a reasonable request, I will look into it.
I am having some trouble, since Lombok.NET internally uses some of the enums which would then be generated by a source generator. I need to see if I can somehow work around that.
I realize I may have mentioned a difficult feature to implement, the source code generator doesn't seem to have good access to the content generated by the source code generator.
For example, accessing attributes generated by the source code generator via IncrementalGeneratorInitializationContext.SyntaxProvider.ForAttributeWithMetadataName
.
If we want to provide support for older versions of the .Net Framework, we should publish the attributes in a separate Nuget package and use a multi-target build.
Translated with DeepL.com (free version)
Hi, This is a nice project! However, Could you please move SourceGeneratorAttributes into SourceGenerator?
This will make it purely an analyzer package. The analyzer is not runtime-limited. And they will work on .Net Framework 4.0 and .Net Framework 3.5.
Like this:
Work on old platform
![image](https://github.com/CollinAlpert/Lombok.NET/assets/42184238/939220b9-9e49-4a37-aa3d-d6a8c018c5ed)