dotnet / website-feedback

This repo is for dot.net feedback including get started tutorial issues from the site.
MIT License
0 stars 1 forks source link

dotnet watch can't work #258

Closed mcxufly closed 1 month ago

mcxufly commented 1 month ago

URL

https://dotnet.microsoft.com/zh-cn/learn/aspnet/blazor-tutorial/run###

Operating system

linux

More information about your system

OS: Arch Linux x86_64 Kernel: 6.11.1-arch1-1

Description

I create a BlazorApp as the tutorial show, but command dotnet watch can't work.

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

App: /usr/share/dotnet/sdk/8.0.402/DotnetTools/dotnet-watch/8.0.402-servicing.24466.16/tools/net8.0/any/dotnet-watch.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '8.0.8' (x64)
.NET location: /usr/share/dotnet/

No frameworks were found.

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

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

dotnet --info

.NET SDK: Version: 8.0.402 Commit: 70aa751718 Workload version: 8.0.400-manifests.2772ffde MSBuild version: 17.11.4+37eb419ad

Runtime Environment: OS Name: arch OS Version:
OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/8.0.402/

.NET workloads installed: Configured to use loose manifests when installing new manifests. There are no installed workloads to display.

Host: Version: 8.0.8 Architecture: x64 Commit: 08338fcaa5

.NET SDKs installed: 8.0.402 [/usr/share/dotnet/sdk]

.NET runtimes installed: Microsoft.NETCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

katiesavage commented 1 month ago

Can you clarify the method you use to install .NET on Linux?

@danroth27 any ideas?

danroth27 commented 1 month ago

My best guess is some step was missed when installing the .NET SDK. Once we hear back on how the install was, done we can try to reproduce the issue.

danroth27 commented 1 month ago

Actually, I investigated this with @richlander, and it looks like on Arch Linux you need to install the ASP.NET Core runtime separately using the aspnet-runtime package. @mcxufly Can you give that a try?: pacman -Sy aspnet-runtime.

@richlander We should probably update our Install .NET on Linux with some instructions on how to get set up on Arch Linux.

richlander commented 1 month ago

For clarity, the following command will install .NET SDK, ASP.NET Core, and .NET runtime.

sudo pacman -Sy dotnet-sdk aspnet-runtime
mcxufly commented 1 month ago

@katiesavage I use pacman installed dotnet-sdk. I do not install package aspnet-runtime. I will install it and try again. And thanks a lot @richlander @danroth27 .

mcxufly commented 1 month ago

I installed package aspnet-runtime, the blazor app run correctly. I think package aspnet-runtime should be mentioned in install page Thanks a lot again!

katiesavage commented 1 month ago

I'm glad this helped! Closing this issue now 🙂

mairaw commented 1 month ago

@adegeo can you check the request for adding information to the docs here?

mairaw commented 1 month ago

Closing. We have https://github.com/dotnet/docs/issues/42849 tracking the docs issue.