private static void SaveLaunchSettings()

in src/Aspire.Hosting.AWS/Utils/ProjectUtilities.cs [130:142]


    private static void SaveLaunchSettings(string projectPath, string content)
    {
        var parentDirectory = Path.GetDirectoryName(projectPath);
        if (string.IsNullOrEmpty(parentDirectory))
            throw new ArgumentException($"The project path '{projectPath}' is invalid. Unable to retrieve the '{Constants.LaunchSettingsFile}' file.");
        var properties = Path.Combine(parentDirectory, "Properties");
        if (!Directory.Exists(properties))
        {
            Directory.CreateDirectory(properties);
        }
        var fullPath = Path.Combine(properties, Constants.LaunchSettingsFile);
        File.WriteAllText(fullPath, content);
    }