Skip to content

Commit

Permalink
Fix build errors about WinForms references if WinUI 2 nuget is added …
Browse files Browse the repository at this point in the history
…to the .NET XAML project
  • Loading branch information
driver1998 committed Jul 28, 2024
1 parent 6a8ff61 commit a3f69d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projections/WinUI/WinUIProjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<PropertyGroup>
<PackageId>DisposableMemory.ModernNetUAP.WinUI</PackageId>
<Version>2.8.6-preview</Version>
<Version>2.8.6-preview2</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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
<ItemGroup>
<!-- WinUI 2 WinMDs -->
<XamlCompileReferencePathWinMD Include="$(PkgMicrosoft_WinUI)/**/*.winmd" />
<XamlCompileReferencePathWinMD Include="$(PkgMicrosoft_WebView2)/**/*.winmd" />
<XamlCompileReferencePathWinMD Include="$(PkgMicrosoft_WebView2)/lib/**/*.winmd" />

<!-- Projections -->
<ReferencePathProjections Include="$(WinUIProjectionPackagePath)lib\**\WinUIProjection.dll" />

<!-- Add WinForms and WPF WebView2 DLLs as "projections" as well,
we don't want them to be referenced during XAML compilation -->
<ReferencePathProjections Include="$(PkgMicrosoft_WebView2)lib\**\Microsoft.Web.WebView2.Core.dll" />
<ReferencePathProjections Include="$(PkgMicrosoft_WebView2)lib\**\Microsoft.Web.WebView2.WinForms.dll" />
<ReferencePathProjections Include="$(PkgMicrosoft_WebView2)lib\**\Microsoft.Web.WebView2.Wpf.dll" />
</ItemGroup>
<Message Importance="high" Text="WinUIXamlCompileReferenceWrap"></Message>
</Target>
Expand Down

0 comments on commit a3f69d2

Please sign in to comment.