0

I've been experimenting with the Logging Source Generator introduced in .NET 6 and have been having great success, however the ability to change where they are emitted during compile time or while saving has eluded me. I'm using Rider and currently the output is being emitted to C:\Users<user.name>\AppData\Local\Temp\RiderSourceGeneratedDocuments<RandomId>\Microsoft.Extensions.Logging.Generators\Microsoft.Extensions.Logging.Generators.LoggerMessageGenerator. It does a similar behavior in VS 2022, however it's a different path.

Is it possible to change the output location for the Logging Source Generator so that the output can be included in the project for Pull Requests and/or other activities?

JGx714791
  • 51
  • 7

1 Answers1

0

The solution outlined here solves this part of the way:

Saving source generator output in source control

There are some issues with repeat building that are mitigated with this answer. https://stackoverflow.com/a/72331159/2879505

JGx714791
  • 51
  • 7