Closed isolin closed 2 years ago
I can reproduce this issue by running through your steps (only taking the SourceGenerators
folder) however the following steps work:
SourceGenerators
folderdotnet build
SourceGenerators/GeneratedDemo
dotnet run
Considering this is how the README.md
specifies how to run this sample i'm not so sure this is an actual issue with the samples.
This is the expected behavior. The demo imports files from other locations in the repository, and will break if those files are missing.
I wanted to try the source generator samples from this repository, but following the instructions in the respective README I just get compilation errors.
Steps to reproduce:
CSharp/SourceGenerators
foldercd
to theGeneratedDemo
folderdotnet run
in CLIThe following errors are reported (multiple times):
I am at Ubuntu 20.04, with 3.1.416 and 6.0.101 SDKs installed.
How can the errors be fixed?
UPDATE: To fix the issues above I needed to update the references section in
SourceGeneratorSamples.csproj
toand add
<LangVersion>10.0</LangVersion>
toGeneratedDemo.csproj