Open pedropaulovc opened 2 months ago
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.
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
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
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!!!
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
Steps to reproduce
9.0.100-preview.3.24204.13
Version 17.10.0 Preview 5.0
Expected: The sample application runs successfully
Actual:
Workaround
dotnet run
to initialize the AppHost projectSystem 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.