Skip to content

Commit

Permalink
Merge pull request #1 from driver1998/webview2
Browse files Browse the repository at this point in the history
Separate WebView2 Projection
  • Loading branch information
driver1998 authored Sep 24, 2024
2 parents d21fdbd + 8cdf9cc commit bcd3a0e
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 78 deletions.
1 change: 1 addition & 0 deletions BuildTasks/BuildTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.10.4" PrivateAssets="all" ExcludeAssets="Runtime"/>
<PackageReference Include="Mono.Cecil" Version="$(_PkgMono_Cecil_Version)" PrivateAssets="all"/>
</ItemGroup>

</Project>
21 changes: 14 additions & 7 deletions ModernXamlCompiler.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "ModernXamlCompiler", "Moder
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projections", "Projections", "{F3E8B257-26E3-4527-B03D-3302576A2F47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIProjection", "Projections\WinUI\WinUIProjection.csproj", "{A678867C-D533-49BE-81A5-B0DDE7FEC701}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildTasks", "BuildTasks\BuildTasks.csproj", "{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIProjectionPackage", "WinUIProjectionPackage\WinUIProjectionPackage.csproj", "{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIProjection", "WinUIProjection\WinUIProjection.csproj", "{D7BD96E1-5F43-495F-8652-B362A7682D40}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,20 +23,25 @@ Global
{909246B3-1658-4E63-8030-4DB48442248A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{909246B3-1658-4E63-8030-4DB48442248A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{909246B3-1658-4E63-8030-4DB48442248A}.Release|Any CPU.Build.0 = Release|Any CPU
{A678867C-D533-49BE-81A5-B0DDE7FEC701}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A678867C-D533-49BE-81A5-B0DDE7FEC701}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A678867C-D533-49BE-81A5-B0DDE7FEC701}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A678867C-D533-49BE-81A5-B0DDE7FEC701}.Release|Any CPU.Build.0 = Release|Any CPU
{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Release|Any CPU.Build.0 = Release|Any CPU
{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7}.Release|Any CPU.Build.0 = Release|Any CPU
{D7BD96E1-5F43-495F-8652-B362A7682D40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7BD96E1-5F43-495F-8652-B362A7682D40}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7BD96E1-5F43-495F-8652-B362A7682D40}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7BD96E1-5F43-495F-8652-B362A7682D40}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A678867C-D533-49BE-81A5-B0DDE7FEC701} = {F3E8B257-26E3-4527-B03D-3302576A2F47}
{2DA123F8-F6AD-4EE5-9E71-C1E669084CE7} = {F3E8B257-26E3-4527-B03D-3302576A2F47}
{D7BD96E1-5F43-495F-8652-B362A7682D40} = {F3E8B257-26E3-4527-B03D-3302576A2F47}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2F83FCE6-75E2-476C-AA91-770C2F3E16AC}
Expand Down
8 changes: 4 additions & 4 deletions projections/WinUI/README.md → WinUIProjection/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DisposableMemory.ModernNetUAP.WinUI

Provides WinUI 2 projections and build support on top of DisposableMemory.ModernNetUAP.XamlCompiler.

# DisposableMemory.ModernNetUAP.WinUI

Provides WinUI 2 projections and build support on top of DisposableMemory.ModernNetUAP.XamlCompiler.

Also works with the new official .NET 9 UWP support.
Original file line number Diff line number Diff line change
@@ -1,48 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="build/DisposableMemory.ModernNetUAP.WinUI.props" />

<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAotCompatible>true</IsAotCompatible>
<WindowsSdkPackageVersion>10.0.19041.39</WindowsSdkPackageVersion>
<CsWinRTUseWindowsUIXamlProjections>true</CsWinRTUseWindowsUIXamlProjections>
</PropertyGroup>

<PropertyGroup>
<PackageId>DisposableMemory.ModernNetUAP.WinUI</PackageId>
<Version>2.8.6.2</Version>
<Authors>driver1998</Authors>
<Description>WinUI 2.x Projections and build support for Modern .NET, requires DisposableMemory.ModernNetUAP.XamlCompiler package.</Description>
<PackageProjectUrl>https://github.com/driver1998/ModernNetUAP.XamlCompiler</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" />
<PackageReference Include="Microsoft.Web.WebView2" Version="$(_PkgWebView2_Version)" GeneratePathProperty="true">
<ExcludeAssets>build; buildtransitive; compile; runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml" Version="$(_PkgWinUI_Version)" GeneratePathProperty="true">
<ExcludeAssets>build; buildtransitive; compile; runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<CsWinRTFilters>
-include Microsoft
</CsWinRTFilters>
</PropertyGroup>

<ItemGroup>
<CsWinRTInputs Include="$(PkgMicrosoft_UI_Xaml)\lib\uap10.0\Microsoft.UI.Xaml.winmd" />
<CsWinRTInputs Include="$(PkgMicrosoft_Web_WebView2)\lib\Microsoft.Web.WebView2.Core.winmd" />
</ItemGroup>

<ItemGroup>
<None Include="build\*" Pack="true" PackagePath="build" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="build/DisposableMemory.ModernNetUAP.WinUI.props" />
<Import Project="../WinUIProjectionPackage/PackageVersion.props"/>

<PropertyGroup>
<Version>$(WinUIProjectionPackageVersion)</Version>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAotCompatible>true</IsAotCompatible>
<WindowsSdkPackageVersion>10.0.19041.39</WindowsSdkPackageVersion>
<CsWinRTUseWindowsUIXamlProjections>true</CsWinRTUseWindowsUIXamlProjections>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" />
<PackageReference Include="Microsoft.Web.WebView2" Version="$(_PkgWebView2_Version)" GeneratePathProperty="true">
<ExcludeAssets>build; buildtransitive; compile; runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml" Version="$(_PkgWinUI_Version)" GeneratePathProperty="true">
<ExcludeAssets>build; buildtransitive; compile; runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<CsWinRTFilters>
-include Microsoft.UI.Xaml
</CsWinRTFilters>
</PropertyGroup>

<ItemGroup>
<CsWinRTInputs Include="$(PkgMicrosoft_UI_Xaml)\lib\uap10.0\Microsoft.UI.Xaml.winmd" />
<CsWinRTInputs Include="$(PkgMicrosoft_Web_WebView2)\lib\Microsoft.Web.WebView2.Core.winmd" />
<Reference Include="$(PkgMicrosoft_Web_WebView2)\lib_manual\net8.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PkgWinUI_Version>2.8.6</_PkgWinUI_Version>
<_PkgWebView2_Version>1.0.1264.42</_PkgWebView2_Version>
<_PkgWebView2_Version>1.0.2839-prerelease</_PkgWebView2_Version>
<WebView2EnableCsWinRTProjection>true</WebView2EnableCsWinRTProjection>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions WinUIProjectionPackage/PackageVersion.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WinUIProjectionPackageVersion>2.8.6.3-preview</WinUIProjectionPackageVersion>
</PropertyGroup>
</Project>
36 changes: 36 additions & 0 deletions WinUIProjectionPackage/WinUIProjectionPackage.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../WinUIProjection/build/DisposableMemory.ModernNetUAP.WinUI.props" />
<Import Project="PackageVersion.props"/>

<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<PackageId>DisposableMemory.ModernNetUAP.WinUI</PackageId>
<Version>$(WinUIProjectionPackageVersion)</Version>
<Authors>driver1998</Authors>
<Description>WinUI 2.x Projections and build support for Modern .NET.</Description>
<PackageProjectUrl>https://github.com/driver1998/ModernNetUAP.XamlCompiler</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\WinUIProjection\build\*" Pack="true" PackagePath="build" />
<None Include="..\WinUIProjection\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="$(_PkgWebView2_Version)" PrivateAssets="none" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WinUIProjection\WinUIProjection.csproj">
<OutputItemType>Content</OutputItemType>
<IncludeAssets>all</IncludeAssets>
<Pack>true</Pack>
<PackagePath>lib/net8.0-windows10.0.19041.0</PackagePath>
</ProjectReference>
</ItemGroup>
</Project>

This file was deleted.

0 comments on commit bcd3a0e

Please sign in to comment.