Last active
May 2, 2023 11:24
-
-
Save noseratio/c42d58049338e67a4c65d6ac552f2d07 to your computer and use it in GitHub Desktop.
Combine AspNetCore, WebView2 and WPF in the same NET 5 Desktop project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net5.0-windows</TargetFramework> | |
<OutputType>Exe</OutputType> | |
<DisableWinExeOutputInference>true</DisableWinExeOutputInference> | |
<UseWPF>true</UseWPF> | |
<UsingMicrosoftNETSdkWeb>true</UsingMicrosoftNETSdkWeb> | |
<StartupObject>WebView2AppKeys.Program</StartupObject> | |
<SatelliteResourceLanguages>en</SatelliteResourceLanguages> | |
<Version>1.0.0</Version> | |
<ApplicationIcon /> | |
</PropertyGroup> | |
<ItemGroup> | |
<FrameworkReference Include="Microsoft.AspNetCore.App" IsImplicitlyDefined="true" /> | |
</ItemGroup> | |
<ItemGroup> | |
<None Remove="test.html" /> | |
</ItemGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.818.41" /> | |
</ItemGroup> | |
<ItemGroup> | |
<Content Include="test.html"> | |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
</Content> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment