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

Microsoft.AspNetCore.ClientAssets has a check for .NET6 so it fails on .NET7 #45849

Closed
1 task done
JohnKiller opened this issue Jan 3, 2023 · 2 comments · Fixed by aspnet/AspLabs#572
Closed
1 task done
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-static-web-assets ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@JohnKiller
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Line 50 and 61 of the targets file:

https://github.com/aspnet/AspLabs/blob/86eedec8a2f26ce0a32eb5f9fe94492a211c4a33/src/ClientAssets/Microsoft.AspNetCore.ClientAssets/build/netstandard2.0/Microsoft.AspNetCore.ClientAssets.targets#L50

https://github.com/aspnet/AspLabs/blob/86eedec8a2f26ce0a32eb5f9fe94492a211c4a33/src/ClientAssets/Microsoft.AspNetCore.ClientAssets/build/netstandard2.0/Microsoft.AspNetCore.ClientAssets.targets#L61

It checks for older .NET core by just comparing it with the string .net6.0 so it treats .net7.0 with the old behaviour, and it breaks.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

I know this package is being reworked as part of #38445 however it would be nice if in the meantime this package could continue to work so we can update to .NET 7.

I can contribute a pull request if it can be merged. Thanks

@JohnKiller
Copy link
Author

JohnKiller commented Jan 3, 2023

As a workaround you can import it in your csproj manually. Copy it in your solution, edit the 2 lines, and add:

<Import Project="..\build\Microsoft.AspNetCore.ClientAssets.targets" />

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-static-web-assets labels Jan 3, 2023
@mkArtakMSFT
Copy link
Member

Thanks for contacting us. This is going to be covered as part of #38445

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Jan 3, 2023
@ghost ghost added the Status: Resolved label Jan 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-static-web-assets ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants