aspire icon indicating copy to clipboard operation
aspire copied to clipboard

[AzureTools][Aspire] Fail to execute the command 'dotnet run' with an error for ASP.NET Web Application(.NET Framework) MVC/Web API project

Open v-mengwe opened this issue 1 year ago • 3 comments
trafficstars

Clean machine: Win11 x64 23h2 ENU VS Version: VS 17.10.0 [34916.146.d17.10] Aspire Version: 8.0.1 Apply NuGet Feeds Podman Desktop: 1.10.2 Podman CLI: 5.0.3

REPRO STEPS:

  1. Create a new ASP.NET Web Application(.NET Framework) MVC/Web API project -> Right click on the project -> Add -> .NET Aspire Orchestrator Support -> OK.
  2. Run dotnet run in the AppHost.project folder.
  3. Check whether succeeds to execute the command.

Expect: Succeed to execute the command without any error.

Actual: Fail to execute the command with an error. image

More Info: F5 successfully when F5ing this project on VS.

v-mengwe avatar May 21 '24 10:05 v-mengwe

We aren't compatible with .NET Framework.

mitchdenny avatar May 21 '24 15:05 mitchdenny

Actually the fact that this option showed up is a tooling issue.

mitchdenny avatar May 21 '24 15:05 mitchdenny

OK so this works in VS, because in VS we build the project and then we rely on DCP to call VS to start the project (which it does happily). In the case of dotnet run, DCP launches the project which triggers a build via dotnet run which fails on the .NET Framework-based project.

mitchdenny avatar May 21 '24 15:05 mitchdenny

Right, this isn't supported. It's not possible to run .NET Framework projects with .NET run, this only works in visual studio.

davidfowl avatar Jun 05 '24 07:06 davidfowl