aspire icon indicating copy to clipboard operation
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

Open v-mengwe opened this issue 1 year ago • 1 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

REPRO STEPS:

  1. 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");
        }
    }
}
  1. F5/run dotnet run in the AppHost.project folder.
  2. CTRL+F5/run dotnet watch in 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. image

More Info:

  1. This issue doesn't reproduce for Console App C# project
  2. The state of the project in the dashboard always is "Running" after adding code Console.ReadKey(); into Program.cs file.

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

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.

mitchdenny avatar May 21 '24 10:05 mitchdenny

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.

davidfowl avatar Sep 08 '24 05:09 davidfowl