Static Web Assets build error with .net 6 rc1 with .net 5 target
See original GitHub issue.NET 6 rc1 still breaks our open source AElemental library static web assets. This issue seems similar (or possibly identical?) to #19475 but the class library that fails is targeting .NET 5. I already opened #20008 for preview 7 but the same issue happens with rc1
2>C:\Program Files\dotnet\sdk\6.0.100-rc.1.21458.32\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.5_0.targets(500,5): error : Static web asset 'C:\code\elemental-blazor\Elemental\wwwroot\css\elemental.min.css' has invalid source type ''. 2>Done building project "Elemental.csproj" -- FAILED.
Repro:
- pull https://github.com/apption-oscode/elemental-blazor/tree/develop
- Use .net SDK 6.0.100-rc.1.21458.32
- Build solution in visual studio
Build did work with .net 6 preview 6 but breaks with .net 6 preview 7 and rc1.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >I keep getting StaticWebAssets.xml build error but I don't ...
The trouble is, these are APIs without any static web assets and I don't want to build or deploy static web assets. Is...
Read more >Untitled
Staticwebassets not found WebFeb 14, 2022 · Hello guys, I found the Issue with very similar question, link below: Microsoft.NET.Sdk.Razor.
Read more >Support for the .NET SDK 5.0
NET 5, including: The first steps in C# 9 support: Top-level statements, native ints, target typed conditional expressions, static lambdas, and ...
Read more >My ASP.NET 5 migration to .NET 6
The first step was updating the target framework moniker to net6.0 . <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net6 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@robertmclaws I saw your commit and explicitly removed.
This was just some build stuff that got messed up and the fix didn’t make it into the RC2 bits.
@javiercn That looks correct. However last night I checked in a change to the
CloudNimble.BlazorEssentials.csproj
file that works around the problem in RC2:You may want to check to make sure that section was not in the build you just tested against.
Thanks!