Is there an existing issue for this?
Describe the bug
With Aspire 13.4, when the the AppHost is multi-targeted (TargetFrameeworks property used instead of TargetFramework), the project fails to build because of a missing task:
F:\.nuget\packages\aspire.apphost.sdk\13.4.2\Sdk\Sdk.targets(143,5): error MSB4036: The "Microsoft.NET.Build.Tasks.PickBestRid" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\dotnet\sdk\10.0.300" directory.
This works fine with the latest 13.3 version
Expected Behavior
I expect the AppHost to be able to build when it is multi-targeted.
Steps To Reproduce
dotnet new aspire-apphost
- In the .csproj, change
<TargetFramework>net10.0</TargetFramework> to <TargetFrameworks>net10.0</TargetFrameworks>
dotnet build
Exceptions (if any)
Build error:
F:\.nuget\packages\aspire.apphost.sdk\13.4.2\Sdk\Sdk.targets(143,5): error MSB4036: The "Microsoft.NET.Build.Tasks.PickBestRid" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\dotnet\sdk\10.0.300" directory.
Aspire doctor output
Aspire Environment Check
Aspire
✅ Aspire CLI version 13.4.2 (channel: stable)
AppHost
⚠️ Could not determine AppHost version (repro.csproj)
.NET SDK
✅ .NET 10.0.300 installed (x64)
Container Runtime
✅ Docker v29.5.2: running (auto-detected (default)) ← active
Environment
✅ HTTPS development certificate is trusted
Summary: 4 passed, 1 warnings, 0 failed
Anything else?
No response
Is there an existing issue for this?
Describe the bug
With Aspire 13.4, when the the AppHost is multi-targeted (
TargetFrameeworksproperty used instead ofTargetFramework), the project fails to build because of a missing task:This works fine with the latest 13.3 version
Expected Behavior
I expect the AppHost to be able to build when it is multi-targeted.
Steps To Reproduce
dotnet new aspire-apphost<TargetFramework>net10.0</TargetFramework>to<TargetFrameworks>net10.0</TargetFrameworks>dotnet buildExceptions (if any)
Build error:
Aspire doctor output
Aspire Environment Check
Aspire
✅ Aspire CLI version 13.4.2 (channel: stable)
AppHost
⚠️ Could not determine AppHost version (repro.csproj)
.NET SDK
✅ .NET 10.0.300 installed (x64)
Container Runtime
✅ Docker v29.5.2: running (auto-detected (default)) ← active
Environment
✅ HTTPS development certificate is trusted
Summary: 4 passed, 1 warnings, 0 failed
Anything else?
No response