-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix Blazor WASM SDK bugs #24172
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
Fix Blazor WASM SDK bugs #24172
Conversation
@@ -32,7 +32,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
|
|||
<PropertyGroup> | |||
<!-- Paths to tools, tasks, and extensions are calculated relative to the BlazorWebAssemblySdkDirectoryRoot. This can be modified to test a local build. --> | |||
<BlazorWebAssemblySdkDirectoryRoot Condition="'$(BlazorWebAssemblySdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</BlazorWebAssemblySdkDirectoryRoot> | |||
<BlazorWebAssemblySdkDirectoryRoot Condition="'$(BlazorWebAssemblySdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\</BlazorWebAssemblySdkDirectoryRoot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our integration tests run from the build output and do not exercise this code path. Our templates will once we have a .NET SDK that includes the Blazor SDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our templates will once we have a .NET SDK that includes the Blazor SDK
When will we be doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to insert the Blazor SDK -> .NET SDK -> Installer -> update our global.json to use this build -> Golden!
@@ -69,7 +69,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
|
|||
</PropertyGroup> | |||
|
|||
<Import Project="Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.targets" /> | |||
<Import Project="Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.targets" Condition="'$(ServiceWorkerAssetsManifest)' != ''" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our test app always had a service worker. Importing this was causing issues in a project that did not have a service worker. I added build and publish tests for an app that's closer to our standalone template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: what issues did it cause for projects that didn't have service workers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The targets unconditionally run when the file is imported: https://github.com/dotnet/aspnetcore/blob/master/src/Components/WebAssembly/Sdk/src/targets/Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.targets#L16. This results in spooky errors because it assumes a manifest file exists
* Correctly calculate tasks path when running as a SDK * Do not perform service-worker things when project does not require it
ef27b2b
to
a011848
Compare
No description provided.