Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebToolsE2E] With Aspire 8.0 P3 installed, if we then install .NET SDK 9.0 P1, we cannot create Aspire app using Aspire 8.0 P3 templates anymore #1951

Open
balachir opened this issue Jan 29, 2024 · 9 comments

Comments

@balachir
Copy link

balachir commented Jan 29, 2024

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install .NET SDK 8.0.200
    • Install using pipeline builds
    • Apply feed for 8.0.200
  3. Install Aspire 8.0 P3

image

image

REPRO STEPS

  1. Using CLI, create new 8.0 P3 Aspire app 'AspireStarterApp2', and build and run

    • Open Command prompt
    • dotnet new aspire-starter -o AspireStarterApp1
  2. Install .NET SDK 9.0 Preview 1

    • Install using daily 9.0 P1 builds
    • Apply feed for 9.0 P1

image

  1. Using CLI, create new 8.0 P3 Aspire app 'AspireStarterApp3'

ACTUAL
Unable to create Aspire Starter Application. The aspire workload is not installed
image

image

Workaround

  • Use global.json to pin the SDK version to the 8.0.2xx version (eg: 8.0.200) that you have installed
{
  "sdk": {
    "version": "8.0.200"
  }
}
  • Eg: With both SDK 8.0.200 and SDK 9.0.0 preview.1 installed, if you add the above global.json to your solution folder Solution01, you can see that the SDK in use is now 8.0.200 and project creation will work successfully.
  • image

EXPECTED
Aspire workload should be installed and we can create Aspire Starter Application

@dsplaisted
Copy link
Member

This looks like the same thing as #2172

@balachir
Copy link
Author

I've updated the Repro Steps with the recommended workaround.

@DamianEdwards
Copy link
Member

@joperezr over a month since this was last updated. Is there any action for us on this one?

@joperezr
Copy link
Member

No real action from us. There are two workarounds that can be used now:

  • If you already have a solution/project, then add a global.json which forces the use of the 8.x SDK. This will make it so that the template locator will also use the 8.x version, and find the 8.0 templates.
  • If you don't have a solution/project and starting from scratch, you can use the suggestion from @phenning here, which essentially suggests to set env variable VS_TEMPLATELOCATOR_SDKVERSION to the 8.0 SDK you have in order to show the right templates.

@DamianEdwards
Copy link
Member

What's the proper fix though? What's the plan to enable creating Aspire 8.0 projects once .NET 9 SDK is installed, especially in VS?

@phenning
Copy link
Contributor

This is actionable. The proper fix is to fix the aspire manifests like described on other threads like the Maui workloads does. The global.json and env var workarounds are not customer friendly and should not be the proposed solution. After this is done, VS will display both net 8 and net 9 versions of the templates.

@DamianEdwards
Copy link
Member

Thanks @phenning. @joperezr are you the right assignee for this then? We should get this fixed as part of 9.0 preview.4 I guess?

@joperezr
Copy link
Member

I see, thanks for the clarification @phenning. Yes, the work to allow targeting .NET 8 with 9.0 workloads is planned for 9.0 Preview 4.

@radical
Copy link
Member

radical commented May 3, 2024

This issue is linked from https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=visual-studio%2Cunix . It should be updated with the plan for work to allow targeting .NET 8 with 9.0 workloads. cc @joperezr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants