diff --git a/src/HotChocolate/Fusion/src/Aspire.Analyzers/ConfigurationGenerator.cs b/src/HotChocolate/Fusion/src/Aspire.Analyzers/ConfigurationGenerator.cs index 1a4cbbee375..da47672ecc5 100644 --- a/src/HotChocolate/Fusion/src/Aspire.Analyzers/ConfigurationGenerator.cs +++ b/src/HotChocolate/Fusion/src/Aspire.Analyzers/ConfigurationGenerator.cs @@ -299,6 +299,7 @@ private static void Execute( writer.WriteLine(); writer.WriteIndentedLine("global::HotChocolate.Fusion.Composition.FusionGatewayConfigurationUtilities.ConfigureAsync(gateways).Wait();"); + writer.WriteIndentedLine("Environment.Exit(0);"); } writer.WriteIndentedLine("}"); diff --git a/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.Designer.cs b/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.Designer.cs index 4cd291943fc..30aafe13d88 100644 --- a/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.Designer.cs +++ b/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.Designer.cs @@ -28,7 +28,7 @@ internal AnalyzerResources() { internal static System.Resources.ResourceManager ResourceManager { get { if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("HotChocolate.Fusion.Composition.Analyzers.Properties.AnalyzerResources", typeof(AnalyzerResources).Assembly); + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("HotChocolate.Fusion.Aspire.Analyzers.Properties.AnalyzerResources", typeof(AnalyzerResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.resx b/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.resx index 8790fce9b43..f62a21096fc 100644 --- a/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.resx +++ b/src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.resx @@ -27,6 +27,13 @@ namespace Aspire.Hosting { public static DistributedApplication Compose(this DistributedApplication application) { + var options = application.Services.GetRequiredService<DistributedApplicationOptions>(); + + if (options.Args is ["compose"]) + { + Environment.Exit(0); + } + return application; } }