microsoft / microsoft/aspire

restore.cmd -mauirestore fails with MSB1001

Open
#14,598 1 comment 0 reactions 0 assignees View on GitHub
needs-area-label
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When following the instructions in the AspireWithMaui playground sample, running:

```pwsh
.\restore.cmd -mauirestore
```

fails with:

```
MSBUILD : error MSB1001: Unknown switch.
Switch: -restoreMaui
```

### Expected Behavior

The restore process should complete successfully and restore MAUI-related workloads and packages required for the `AspireWithMaui` sample.

### Steps To Reproduce

1. Clone the Aspire repository
2. Navigate to the repo root
3. Run: `.\restore.cmd -mauirestore`

### Exceptions (if any)

```
PS C:\Temp\aspire> .\restore.cmd -mauirestore
& "C:\Temp\aspire\eng/common/build.ps1" -restoreMaui -restore
MSBUILD : error MSB1001: Unknown switch.
Full command line: 'C:\Temp\aspire\.dotnet\sdk\10.0.102\MSBuild.dll -maxcpucount --verbosity:m -tlp:default=auto --property:ContinuousIntegrationBuild=False --property:TreatWarningsAsErrors=true --property:Configuration=Debug --property:RepoRoot=C:\Temp\aspire\ --property:Restore=True --property:DeployDeps=False --property:Build=False --property:Rebuild=False --property:Deploy=False --property:Test=False --property:Pack=False --property:DotNetBuild=False --property:DotNetBuildFromVMR=False --property:IntegrationTest=False --property:PerformanceTest=False --property:Sign=False --property:Publish=False --property:RestoreStaticGraphEnableBinaryLogger=False --verbosity:minimal /m /nologo /clp:Summary /nr:True /warnaserror C:\Users\conta\.nuget\packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.26110.1\tools\Build.proj -restoreMaui -distributedlogger:Microsoft.DotNet.Cli.Commands.MSBuild.MSBuildLogger,C:\Temp\aspire\.dotnet\sdk\10.0.102\dotnet.dll*Microsoft.DotNet.Cli.Commands.MSBuild.MSBuildForwardingLogger,C:\Temp\aspire\.dotnet\sdk\10.0.102\dotnet.dll'
Switches appended by response files:
Switch: -restoreMaui
```

### .NET Version info

10.0.102

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.