dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET

Home Page:https://learn.microsoft.com/dotnet/aspire

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExecutableReconciler error when running Aspire sample application 9.0.0-preview.3.24210.17 with Visual Studio 17.10 Preview 5.0

pedropaulovc opened this issue · comments

Steps to reproduce

  1. Install the latest .NET 9 SDK - Currently using 9.0.100-preview.3.24204.13
  2. Upgrade Visual Studio 2022 Preview to Preview 5.0 - Currently using Version 17.10.0 Preview 5.0
  3. Create a new project > Aspire Sample Application > Use .NET 9
  4. Start the AppHost

Expected: The sample application runs successfully

Actual:

info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.0.0-preview.3.24210.17+c2d83148f169bdf4980393a66eff2a28e94eb6c9
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: C:\src\AspireNet9\AspireNet9.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: https://localhost:17120
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-kil37d0"}, "Reconciliation": 6, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-2mtuphg"}, "Reconciliation": 7, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-kil37d0"}, "Reconciliation": 8, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-2mtuphg"}, "Reconciliation": 9, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-kil37d0"}, "Reconciliation": 10, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-2mtuphg"}, "Reconciliation": 11, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}

image

Workaround

  1. Use dotnet run to initialize the AppHost project
  2. Attach the Visual Studio debugger manually

System Info

Aspire.Hosting.AppHost Version 9.0.0-preview.3.24210.17

Microsoft Visual Studio Enterprise 2022
Version 17.10.0 Preview 5.0
VisualStudio.17.Preview/17.10.0-pre.5.0+34818.151
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Enterprise

ASP.NET and Web Tools 17.10.331.13417
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.10.331.13417
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 17.10.331.13417
Azure Functions and Web Jobs Tools

C# Tools 4.10.0-3.24211.4+e482b6e281d7db727fcb086ebbfae44dcba82c6d
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub Copilot 0.2.865.42014
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

Microsoft Azure Tools for Visual Studio 2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.10.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.10.3.2420403+bb51c9aed4e1001def084176c9ec95e1ef6792eb
Provides languages services for ASP.NET Core Razor.

TypeScript Tools 17.0.30327.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.10.0-3.24211.4+e482b6e281d7db727fcb086ebbfae44dcba82c6d
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.10.0-beta.24172.5+8d852e43d35fdac96b1ba52e3bd4b35350035914
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

The same happens for me when using Jetbrains Rider 2024.1.1 with .NET 9.0.100-preview.3 and .NET Aspire 9.0.0-preview.3.24210.17/9.0.100-preview.1.

I would recommend staying away from the 9.x version of aspire. We're attempting to unlist the nuget packages as its not ready for prime time.

I have the same issue if I use the Preview 6 8.0.0-preview.6.24214.1 and net8.0 as TFM.
Interestingly enough, there are no issue targeting 8.0.0-preview.6.24214.1 and TFM net9.0

I have the same issue if I use the Preview 6 8.0.0-preview.6.24214.1 and net8.0 as TFM.

Can you provide more information? Did you install the preview 6 workload? Did you update all of the packages to preview 6? What dotnet SDK version do you have installed (dotnet --info)? What workloads do you have installed (dotnet workload list)?

Finally, does it reproduce with a new project?

yes I installed the preview6 workload and just created a new Starter project and adjusted all the versions from 9xx to 8.0.0-preview.6.24214.1 and changed the TFM to net8.0

EDIT:
I also changed the version in the ServiceDefaults project and changed the fllowing:

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.4.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.6.24214.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />

the versions of the OpenTelemetry.* packaged from 1.7.1 to 1.8.* since the 1.7.*er dependencies were reported as vulnerable (should probably changed in the template)

Can you share all of the other information?

I just created a repro repo: https://github.com/dersia/aspire_preview6_bug_repro
@davidfowl is this enough or do you need more information?

I need to know the output of: dotnet workload list, dotnet --info, what IDE you are using, the version of that IDE and if it reproduces when you use dotnet run.

PS: We're not testing the .NET 9 version of Aspire. The team is fully focused on the NET 8 version. I recommend using .NET 8 and the 8.x packages.

dotnet workload list
Installed Workload Id      Manifest Version                                Installation Source
--------------------------------------------------------------------------------------------------------------------
aspire                     9.0.0-preview.3.24210.17/9.0.100-preview.1      SDK 9.0.100-preview.3, VS 17.10.34818.151
tvos                       17.2.9433-net9-p3/9.0.100-preview.3             VS 17.10.34818.151
macos                      14.2.9433-net9-p3/9.0.100-preview.3             VS 17.10.34818.151
android                    34.99.0-preview.3.231/9.0.100-preview.3         VS 17.10.34818.151
maui-windows               9.0.0-preview.3.10457/9.0.100-preview.3         VS 17.10.34818.151
ios                        17.2.9433-net9-p3/9.0.100-preview.3             VS 17.10.34818.151
wasm-tools-net6            9.0.0-preview.3.24172.9/9.0.100-preview.3       VS 17.10.34818.151
wasm-tools-net7            9.0.0-preview.3.24172.9/9.0.100-preview.3       VS 17.10.34818.151
wasm-tools                 9.0.0-preview.3.24172.9/9.0.100-preview.3       VS 17.10.34818.151
maccatalyst                17.2.9433-net9-p3/9.0.100-preview.3             VS 17.10.34818.151

Use dotnet workload search to find additional workloads to install.
dotnet --info
.NET SDK:
 Version:           9.0.100-preview.3.24204.13
 Commit:            81f61d8290
 Workload version:  9.0.100-manifests.f4f7fc79
 MSBuild version:   17.11.0-preview-24178-16+7ca3c98fa

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26200
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.100-preview.3.24204.13\

.NET workloads installed:
 [aspire]
   Installation Source: SDK 9.0.100-preview.3, VS 17.10.34818.151
   Manifest Version:    9.0.0-preview.3.24210.17/9.0.100-preview.1
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.aspire\9.0.0-preview.3.24210.17\WorkloadManifest.json
   Install Type:              Msi

 [tvos]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    17.2.9433-net9-p3/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.tvos\17.2.9433-net9-p3\WorkloadManifest.json
   Install Type:              Msi

 [macos]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    14.2.9433-net9-p3/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.macos\14.2.9433-net9-p3\WorkloadManifest.json
   Install Type:              Msi

 [android]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    34.99.0-preview.3.231/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.android\34.99.0-preview.3.231\WorkloadManifest.json
   Install Type:              Msi

 [maui-windows]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    9.0.0-preview.3.10457/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.maui\9.0.0-preview.3.10457\WorkloadManifest.json
   Install Type:              Msi

 [ios]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    17.2.9433-net9-p3/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.ios\17.2.9433-net9-p3\WorkloadManifest.json
   Install Type:              Msi

 [wasm-tools-net6]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    9.0.0-preview.3.24172.9/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.workload.mono.toolchain.net6\9.0.0-preview.3.24172.9\WorkloadManifest.json
   Install Type:              Msi

 [wasm-tools-net7]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    9.0.0-preview.3.24172.9/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.workload.mono.toolchain.net7\9.0.0-preview.3.24172.9\WorkloadManifest.json
   Install Type:              Msi

 [wasm-tools]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    9.0.0-preview.3.24172.9/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.workload.mono.toolchain.current\9.0.0-preview.3.24172.9\WorkloadManifest.json
   Install Type:              Msi

 [maccatalyst]
   Installation Source: VS 17.10.34818.151
   Manifest Version:    17.2.9433-net9-p3/9.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.3\microsoft.net.sdk.maccatalyst\17.2.9433-net9-p3\WorkloadManifest.json
   Install Type:              Msi


Host:
  Version:      9.0.0-preview.3.24172.9
  Architecture: x64
  Commit:       9e6ba1f68c

.NET SDKs installed:
  7.0.100-rc.2.22477.23 [C:\Program Files\dotnet\sdk]
  7.0.202 [C:\Program Files\dotnet\sdk]
  8.0.100-rc.1.23463.5 [C:\Program Files\dotnet\sdk]
  8.0.204 [C:\Program Files\dotnet\sdk]
  8.0.300-preview.24203.14 [C:\Program Files\dotnet\sdk]
  9.0.100-preview.3.24204.13 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-rc.2.22476.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-rc.1.23421.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0-preview.3.24172.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-rc.1.23419.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0-preview.3.24172.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0-rc.2.22472.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.0-rc.1.23420.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.0-preview.3.24175.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found
dotnet run
Build succeeded in 17,0s
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 8.0.0-preview.6.24214.1+6596fdc41a8d419876a6bf4abc17b7c66b9ef63a
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: C:\sources\***\FOA.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: https://localhost:17128
info: Aspire.Hosting.DistributedApplication[0]
      Login to the dashboard at https://localhost:17128/login?t=513bdddbef48085ffb45e47bf034f99c
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.

using VS 2022 17.10.0 Preview 5.

PS: We're not testing the .NET 9 version of Aspire. The team is fully focused on the NET 8 version. I recommend using .NET 8 and the 8.x packages.

this is exactly why I changed it all to .net8

this is exactly why I changed it all to .net8

Nope

You're using the 9.x workload, not the 8.x workload:

aspire                     9.0.0-preview.3.24210.17/9.0.100-preview.1      SDK 9.0.100-preview.3, VS 17.10.34818.151

I would recommend using a global.json to pin the version of the SDK to 8.0.204 (which you have installed) and install the preview 6 version into that SDK.

If you are having a hard time installing the preview 6 sdk then you can do:

aspire-rollback.txt

{
  "microsoft.net.sdk.aspire": "8.0.0-preview.6.24214.1/8.0.100"
}

Then run these commands.

# Run dotnet workload update command
dotnet workload update --from-rollback-file .\aspire-rollback.txt

# Run dotnet workload install command
dotnet workload install aspire --from-rollback-file .\aspire-rollback.txt

this is exactly why I changed it all to .net8

Nope

yeah, you are right, I only changed that in the ServiceDefaults project in the repro. I updated the repro. still the same output when I start it using VS:

info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 8.0.0-preview.6.24214.1+6596fdc41a8d419876a6bf4abc17b7c66b9ef63a
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: C:\Users\dersi\source\repos\AspireApp1\AspireApp1.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: https://localhost:17289
info: Aspire.Hosting.DistributedApplication[0]
      Login to the dashboard at https://localhost:17289/login?t=8939d13c569942471859a2cf37c22b75
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-uabv8h0"}, "Reconciliation": 2, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-s0jssu0"}, "Reconciliation": 4, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-uabv8h0"}, "Reconciliation": 12, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-s0jssu0"}, "Reconciliation": 13, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: unexpected EOF"}

After pinning Aspire to the net8-workload and pinnig dotnet to net8 it works :)

I had the same issues and can confirm that the below fix from Fowler works. Now to Aspire All the Things!!!
image

You're using the 9.x workload, not the 8.x workload:

aspire                     9.0.0-preview.3.24210.17/9.0.100-preview.1      SDK 9.0.100-preview.3, VS 17.10.34818.151

I would recommend using a global.json to pin the version of the SDK to 8.0.204 (which you have installed) and install the preview 6 version into that SDK.

If you are having a hard time installing the preview 6 sdk then you can do:

aspire-rollback.txt

{
  "microsoft.net.sdk.aspire": "8.0.0-preview.6.24214.1/8.0.100"
}

Then run these commands.

# Run dotnet workload update command
dotnet workload update --from-rollback-file .\aspire-rollback.txt

# Run dotnet workload install command
dotnet workload install aspire --from-rollback-file .\aspire-rollback.txt