Code generated from Source Generators don't show when targeting netstandard2.0 (Rider 2022.2.4 OSX)

Hi,

I'm building a library using a Source Generator project targeting both netstandard2.0 (with Roslyn 3.8) and net6 (with Roslyn 4.0). The library compiles fine for both targets but the generated code doesn't show in the Solution Explorer Dependencies>.NETStandard 2.0 section the same as it does in the .NET 6.0 section.

I'm using the source generator to implement abstract inherited methods to a partial class but in the netstandard2.0 case Rider also complains that those methods are not present even though everything compiles fine.

Is there an undocumented limitation to source generators support with regards to .NET version or am I doing something wrong?

Thanks

1 comment
Comment actions Permalink

Hi judubu

Thank you for contacting Rider Support. To take a closer look at the issue, we will need some additional information. Please do the following:
- Navigate to Help | Diagnostic tools | Choose Trace Scenarios and enable Trace scenario for Roslyn;
- Reproduce the issue, and collect the full log bundle via Help | Collect logs; disable Trace scenarios;
- Upload the resulting logs to our server and share your ID. 

Also, if you can share sample project or your library, it also helps to investigate the issue. 

Thank you in advance and have a great day!

0

Please sign in to leave a comment.