Is there any standard method/option, how to arrange the files generated via Source Generators
and added to the build process are also physically visible in the project structure (so developer can review the result code e.g. via VS solution explorer window)?
I mean other than I save the code directly to a file in the generator's Execute()
, which I would expect might bring other complications (not tried yet).
EDIT:
C:\Users\user\AppData\Local\Temp\.vsdbgsrc\some-guid\FileNameHint.cs
. Unfortunately standard VS navigation (F12) does not work (regardless of debug session activity).Add following to the project using the generator:
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>DesiredPathForGeneratedStuff</CompilerGeneratedFilesOutputPath>
</PropertyGroup>