CSharpShellApp
CSharpShellApp copied to clipboard
Sourcegenerator question
Can I use Sourcegenerator in your app? If yes, how?
(link: https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview)
I tried but nothing happens
My code in Program(SourceGenerator same as in link example):
namespace Test;
partial class Program { static void Main(string[] args) { HelloFrom("Generated Code"); }
static partial void HelloFrom(string name);
}
For the SourceGenerator I created console project, but set TargetFramework to netstandard2.0 manually(just modified csproj file)
Added this to main program csproj(with right path):
It is mostly a build tools feature instead of Roslyn feature, so I will have to implement it explicitly. Also pretty sure this needs to be supported first.