Skip to content

restore.cmd -mauirestore fails with MSB1001 #14598

@bac83

Description

@bac83

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

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

.\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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions