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

Issue running Blazor in tutorial #269

Closed ivz-richard closed 5 days ago

ivz-richard commented 5 days ago

URL

https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-cli-tutorial/run

Operating system

windows

More information about your system

Windows 11 23H2 (OS Build 22631.4317) on x64

Description

Issues while running tutorial. It looks like the Microsoft.NET.Sdk.StaticWebAssets.target want the PackageId variable but it isn't set

PS C:\dev\repos\BlazorApp> dotnet watch dotnet watch 🔥 Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. 💡 Press "Ctrl + R" to restart. dotnet watch 🔧 Building... Determining projects to restore... All projects are up-to-date for restore. C:\Program Files\dotnet\sdk\8.0.403\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.target s(507,5): error MSB4044: The "DiscoverStaticWebAssets" task was not given a value for the required parameter "SourceId". [C :\dev\repos\BlazorApp\BlazorApp.csproj] dotnet watch ⏳ Waiting for a file to change before restarting dotnet...

dotnet --info

.NET SDK: Version: 8.0.403 Commit: c64aa40a71 Workload version: 8.0.400-manifests.18f19b92 MSBuild version: 17.11.9+a69bbaaf5

Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.403\

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

Host: Version: 8.0.10 Architecture: x64 Commit: 81cabf2857

.NET SDKs installed: 6.0.427 [C:\Program Files\dotnet\sdk] 8.0.403 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.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

ivz-richard commented 5 days ago

I was able to fix this myself by adding a PackageId property to the PropertyGroup section in BlazorApp.csproj.