aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Add MAUI solution generation

Open sebastienros opened this issue 3 weeks ago • 2 comments

Description

  • Added functionality to generate AspireWithMaui.slnx from the existing Aspire.slnx, including necessary project references.
  • Updated README.md to document the new solution generation step.
  • Created initial AspireWithMaui.slnx file with project structure for the MAUI application.

Checklist

  • Is this feature complete?
    • [x] Yes. Ready to ship.
    • [ ] No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • [ ] Yes
    • [x] No
  • Did you add public API?
    • [ ] Yes
      • If yes, did you have an API Review for it?
        • [ ] Yes
        • [ ] No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • [ ] Yes
        • [ ] No
    • [x] No
  • Does the change make any security assumptions or guarantees?
    • [ ] Yes
      • If yes, have you done a threat model and had a security review?
        • [ ] Yes
        • [ ] No
    • [x] No
  • Does the change require an update in our Aspire docs?
    • [ ] Yes
    • [ ] No

sebastienros avatar Nov 14 '25 18:11 sebastienros

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12969

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12969"

github-actions[bot] avatar Nov 14 '25 18:11 github-actions[bot]

@jfversluis Do you know why I would be getting this error locally when restoring MAUI workload? It happens without the changes in this PR

Workload installation failed: Failed to install workload version 10.0.100-rc.2.25513.4: Version 10.100.0-rc.2.25513.4 of package microsoft.net.workloads.10.0.100-rc.2 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json;https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json.

sebastienros avatar Nov 15 '25 01:11 sebastienros

@copilot when running ./restore.sh -restoremaui there is an error:

Generating AspireWithMaui.slnx...
sed: 1: "/<\/Solution>/i\  <Fold ...": extra characters after \ at the end of i command

sebastienros avatar Nov 17 '25 16:11 sebastienros

@sebastienros I've opened a new pull request, #13003, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot avatar Nov 17 '25 16:11 Copilot

@jfversluis I merged since it's working with bash but the powershell version doesn't work on main either. This PR makes it go further.

sebastienros avatar Nov 17 '25 16:11 sebastienros

Filed https://github.com/dotnet/aspire/issues/13006

sebastienros avatar Nov 17 '25 16:11 sebastienros

@jfversluis Do you know why I would be getting this error locally when restoring MAUI workload? It happens without the changes in this PR

Workload installation failed: Failed to install workload version 10.0.100-rc.2.25513.4: Version 10.100.0-rc.2.25513.4 of package microsoft.net.workloads.10.0.100-rc.2 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json;https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json.

That's the workload set from RC2 and should only work with RC2. We never published the RC2 workload set to dotnet-public (it's on nuget and dotnet10-workloads feeds). Any chance you're still on RC2 and need to update to GA first?

marcpopMSFT avatar Nov 17 '25 17:11 marcpopMSFT

@marcpopMSFT

PS C:\Users\sebros> dotnet --version
10.0.100

But this repo pins to RC2, so that would explain.

S D:\aspire> cat .\global.json
{
  "sdk": {
    "version": "10.0.100-rc.2.25502.107",
    "rollForward": "major",
    "allowPrerelease": true,
    "paths": [
      ".dotnet",
      "$host$"
    ],
    "errorMessage": "The .NET SDK could not be found. Run ./restore.sh (Linux/macOS) or ./restore.cmd (Windows) to install the local SDK."
  }

sebastienros avatar Nov 17 '25 17:11 sebastienros

Ahh that makes sense. Plans to update to GA? I wasn't planning on publishing RC2 workload components to dotnet-public.

marcpopMSFT avatar Nov 18 '25 23:11 marcpopMSFT