question

NunoPimenta-1837 avatar image
0 Votes"
NunoPimenta-1837 asked ZhiLv-MSFT edited

When I try to use Blazer it seems that .NET Framework SDK 6.0 is not installed

When I try to use Blazor it seems that .NET Framework SDK 6.0 is not installed.

Console comands:
'dotnet' comand:

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
-h|--help Display help.
--info Display .NET information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.

path-to-application:
The path to an application .dll file to execute.

'dotnet -version' comand
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
You intended to execute a .NET program:
The application '-version' does not exist.
You intended to execute a .NET SDK command:
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download

Why? How can I fix it?

dotnet-csharpdotnet-aspnet-core-blazor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

it appears you installed the runtime, and not the sdk. just install the sdk

https://dotnet.microsoft.com/en-us/download/dotnet/6.0

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ZhiLv-MSFT avatar image
0 Votes"
ZhiLv-MSFT answered ZhiLv-MSFT edited

Hi @NunoPimenta-1837,

When I try to use Blazor it seems that .NET Framework SDK 6.0 is not installed.

You can use the following commands to display the installed SDKs:

 dotnet --list-sdks

202444-image.png

or:

 dotnet --info

If you don't install the Asp.net 6 SDK, you can download and install it from here: .NET 6.0.
Or, if you are using Visual Studio 2019/2022, you can also install the .Net 6 SDK and runtime via the Visual Studio Installer(select the .Net 6 Runtime).

202485-image.png

Besides, if installed .Net SDK multiple times, it might also meet this error. To solve it, you can remove the installed SDKs first, and then use the above methods to install the .Net 6 SDK again.

Refer this thread: Could not execute because the application was not found or a compatible .NET SDK is not installed..


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Best regards,
Dillion


image.png (31.5 KiB)
image.png (47.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.