Skip to content

Commit

Permalink
Merge pull request #33 from ByronMayne/32-compiler-error-on-207-in-ge…
Browse files Browse the repository at this point in the history
…nerated-class

Fixed the compiler error due to using the environment
  • Loading branch information
ByronMayne authored Dec 9, 2024
2 parents 34708c0 + 2b17dde commit 795f6df
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ internal abstract class SourceGeneratorHoist
static SourceGeneratorHoist()
{
#pragma warning disable RS1035 // Do not use APIs banned for analyzers
if(bool.TryParse(System.Environment.GetEnvironmentVariable("SGF_DEBUGGER_LAUNCH"), out bool launchDebugger)
&& launchDebugger)
{
System.Diagnostics.Debugger.Launch();
}
#pragma warning restore RS1035 // Do not use APIs banned for analyzers
s_assembliesWithResources = new List<Assembly>();
Expand Down

0 comments on commit 795f6df

Please sign in to comment.