aspire
aspire copied to clipboard
[AzureTools][Aspire] The state of the Console App (.NET Framework) project in the dashboard is inconsistent between F5 and CTRL+F5
Clean machine: Win11 x64 23h2 ENU VS Version: VS 17.10.0 [34916.146.d17.10] Aspire Version: 8.0.1 Apply NuGet Feeds
REPRO STEPS:
- Create a new Console App (.NET Framework) App -> Add code
Console.WriteLine("hello world");into Program.cs file -> Add -> .NET Aspire Orchestrator Support -> OK.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp4
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("hello world");
}
}
}
- F5/run
dotnet runin the AppHost.project folder. - CTRL+F5/run
dotnet watchin the AppHost.project folder.
Expect: The state of the project in the dashboard is consistent.
Actual:
The state of the project in the dashboard is inconsistent.
More Info:
- This issue doesn't reproduce for Console App C# project
- The state of the project in the dashboard always is "Running" after adding code
Console.ReadKey();into Program.cs file.
Good catch. The Finished/Running is really just based on whether the process launched is running or not. In the case of dotnet watch the process is still running. If you edit one of the source files it should rebuild and run.
This is by design. As @mitchdenny said, the process when you dotnet watch becomes dotnet watch itself. This will be fixed when we get first class integration with watch https://github.com/dotnet/sdk/issues/36971.