diff --git a/src/SourceGenerator.Foundations.Shared/Core/IncrementalGenerator.cs b/src/SourceGenerator.Foundations.Shared/Core/IncrementalGenerator.cs index a2d1cd6..fb6e7b3 100644 --- a/src/SourceGenerator.Foundations.Shared/Core/IncrementalGenerator.cs +++ b/src/SourceGenerator.Foundations.Shared/Core/IncrementalGenerator.cs @@ -63,11 +63,12 @@ private ILogger CreateLogger(string sourceContext) logger.AddSink(sink); } } - +#pragma warning disable RS1035 // Do not use APIs banned for analyzers if (Environment.UserInteractive) { logger.AddSink(); } +#pragma warning restore RS1035 // Do not use APIs banned for analyzers return logger; } @@ -156,7 +157,9 @@ private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) Assembly? assembly = null; try { +#pragma warning disable RS1035 // Do not use APIs banned for analyzers assembly = Assembly.Load(platformAssembly); +#pragma warning restore RS1035 // Do not use APIs banned for analyzers Type? platformType = assembly? .GetTypes() .Where(typeof(IDevelopmentPlatform).IsAssignableFrom)