dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.37k stars 349 forks source link

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

Open v-mengwe opened 1 month ago

v-mengwe commented 1 month ago

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.

mitchdenny commented 1 month ago

We aren't compatible with .NET Framework.

mitchdenny commented 1 month ago

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

mitchdenny commented 1 month ago

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.

davidfowl commented 4 weeks ago

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