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

Stawberryshake incorrectly picks .net9 Tool in .net8 project #7820

Closed
adminnz opened this issue Dec 11, 2024 · 1 comment
Closed

Stawberryshake incorrectly picks .net9 Tool in .net8 project #7820

adminnz opened this issue Dec 11, 2024 · 1 comment

Comments

@adminnz
Copy link

adminnz commented Dec 11, 2024

Product

Strawberry Shake

Version

14.2.0

Link to minimal reproduction

https://github.com/adminnz/Issue

Steps to reproduce

  1. Create new .net8 Class Library
  2. Open terminal in solution folder
  3. Run dotnet add package StrawberryShake.Blazor
  4. Run dotnet new tool-manifest
  5. Run dotnet tool install StrawberryShake.Tools
  6. Run dotnet graphql init https://demo.chillicream.com/graphql/ -n CryptoClient -p ./Demo

What is expected?

Runs the strawberryshake.tools\14.2.0\tools\net8.0\any\dotnet-graphql.dll

What is actually happening?

Attempts to run the strawberryshake.tools\14.2.0\tools\net9.0\any\dotnet-graphql.dll

Relevant log output

You must install or update .NET to run this application.

App: C:\Users\<redacted>\.nuget\packages\strawberryshake.tools\14.2.0\tools\net9.0\any\dotnet-graphql.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '9.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.35 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.36 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.10 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  9.0.0-rc.2.24473.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=x64&rid=win-x64&os=win10

Additional context

I'm not sure if there is a command argument i can pass for the dotnet graphql init to make it use the .net8 tool rather than the .net9.

Upgrading the project to .net9 is not an option.

Also just FYI: The slack link when creating an issue is no longer valid. It says:

This link is no longer active

To join this workspace, you’ll need to ask the person who originally invited you for a new link.
@adminnz
Copy link
Author

adminnz commented Dec 11, 2024

Found out that if the net9 RC was installed on the machine, it causes the tool to break. Installing the .net 9 SDK and redoing the steps works against a .net 8 project.

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

1 participant