Skip to content

Commit

Permalink
[Blazor] Reacts to SDK and Runtime updates and adds support for click…
Browse files Browse the repository at this point in the history
…-once deployments in WPF and Winforms apps (#2187)

* React to SDK, ASP.NET Core updates
* Add targets for winforms and wpf packages
* Add imports for sample projects
  • Loading branch information
javiercn committed Aug 20, 2021
1 parent 5834277 commit 50999f6
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 540 deletions.
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\src\WindowsForms\build\Microsoft.AspNetCore.Components.WebView.WindowsForms.props" />

<PropertyGroup>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
Expand All @@ -19,4 +21,6 @@
</Content>
</ItemGroup>

<Import Project="..\..\src\WindowsForms\build\Microsoft.AspNetCore.Components.WebView.WindowsForms.targets" />

</Project>
4 changes: 4 additions & 0 deletions src/BlazorWebView/samples/BlazorWpfApp/BlazorWpfApp.csproj
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\src\Wpf\build\Microsoft.AspNetCore.Components.WebView.Wpf.props" />

<PropertyGroup>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
Expand All @@ -19,4 +21,6 @@
</Content>
</ItemGroup>

<Import Project="..\..\src\Wpf\build\Microsoft.AspNetCore.Components.WebView.Wpf.targets" />

</Project>
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
Expand Up @@ -5,7 +5,6 @@
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<Description>Build .NET MAUI applications with Blazor web UI in the BlazorWebView control.</Description>
<DefineConstants>$(DefineConstants);MAUI_INCLUDE</DefineConstants>
</PropertyGroup>

<Import Project="..\..\..\..\.nuspec\Microsoft.Maui.Controls.MultiTargeting.targets" />
Expand Down
Expand Up @@ -48,21 +48,4 @@
</ItemGroup>
</Target>

<Target Name="EnsureBundles" BeforeTargets="CoreCompile" DependsOnTargets="_ResolveBundlingConfiguration;BundleScopedCssFiles" />

<Target Name="_FixUpMauiReference"
BeforeTargets="ComputeReferencedProjectsPublishAssets"
AfterTargets="LoadStaticWebAssetsBuildManifest">

<ItemGroup>
<_MauiManifestsToUpdate Include="@(StaticWebAssetManifest)" Condition="'%(ManifestType)' == 'Publish'" />
<_MauiManifestsToUpdate>
<AdditionalPublishPropertiesToRemove Condition="$([System.String]::Copy('%(_MauiManifestsToUpdate.AdditionalPublishProperties)').Contains('TargetFramework')) == 'false'">@(_MauiManifestsToUpdate->'%(AdditionalPublishPropertiesToRemove)');TargetFramework</AdditionalPublishPropertiesToRemove>
</_MauiManifestsToUpdate>

<StaticWebAssetManifest Remove="@(_MauiManifestsToUpdate)" />
<StaticWebAssetManifest Include="@(_MauiManifestsToUpdate)" />
</ItemGroup>

</Target>
</Project>

0 comments on commit 50999f6

Please sign in to comment.