diff --git a/LightweightIocContainer.FactoryGenerator/FactoryGenerator.cs b/LightweightIocContainer.FactoryGenerator/FactoryGenerator.cs index 7ce3184..2d0b59d 100644 --- a/LightweightIocContainer.FactoryGenerator/FactoryGenerator.cs +++ b/LightweightIocContainer.FactoryGenerator/FactoryGenerator.cs @@ -161,6 +161,9 @@ public class FactoryGenerator : IIncrementalGenerator stringBuilder.AppendLine(GENERATED_FILE_HEADER); stringBuilder.AppendLine(); + + stringBuilder.AppendLine("#nullable enable"); + stringBuilder.AppendLine(); stringBuilder.AppendLine("using LightweightIocContainer;"); stringBuilder.AppendLine();