-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Use BlazorWebAssemblySDK #24371
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
Use BlazorWebAssemblySDK #24371
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,6 +321,8 @@ public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput() | |
project.AddProjectFileContent( | ||
@" | ||
<PropertyGroup> | ||
<!-- Workaround for https://github.com/mono/linker/issues/1390 --> | ||
<PublishTrimmed>false</PublishTrimmed> | ||
<DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
|
@@ -450,6 +452,8 @@ public async Task Publish_HostedApp_WithSatelliteAssemblies() | |
wasmProject.AddProjectFileContent( | ||
@" | ||
<PropertyGroup> | ||
<!-- Workaround for https://github.com/mono/linker/issues/1390 --> | ||
<PublishTrimmed>false</PublishTrimmed> | ||
<DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
|
@@ -637,7 +641,7 @@ public async Task Publish_HostedAppWithScopedCss_VisualStudio() | |
// Arrange | ||
using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "blazorwasm", "razorclasslibrary", }); | ||
File.WriteAllText(Path.Combine(project.SolutionPath, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }"); | ||
|
||
project.Configuration = "Release"; | ||
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build", "/p:BuildInsideVisualStudio=true"); | ||
|
||
|
@@ -701,6 +705,8 @@ public async Task Publish_HostedApp_VisualStudio_WithSatelliteAssemblies() | |
var existing = File.ReadAllText(blazorwasmProjFile); | ||
var updatedContent = @" | ||
<PropertyGroup> | ||
<!-- Workaround for https://github.com/mono/linker/issues/1390 --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like the referenced issue was fixed. Do we need this workaround because the fix isn't shipped? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yup. Waiting for the fix to get to the .net sdk |
||
<PublishTrimmed>false</PublishTrimmed> | ||
<DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> | ||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier> | ||
<UseBlazorWebAssembly>true</UseBlazorWebAssembly> | ||
<FixupWebAssemblyHttpHandlerReference>true</FixupWebAssemblyHttpHandlerReference> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a very nice looking csproj now! |
||
|
This file was deleted.
This file was deleted.
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.
Why are we bringing back the
UsingMicrosoftNETSdkBlazorWebAssembly
property?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.
This might be to prevent double imports?
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.
This is set in the SDK similar to other SDKs