Skip to content

Commit

Permalink
chore: Updating packages and workaround for microsoft/microsoft-ui-xa…
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrandolph committed Mar 13, 2024
1 parent c9e746e commit 76a69ad
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
5 changes: 3 additions & 2 deletions testing/TestHarness/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<PackageVersion Include="Microsoft.Toolkit.Uwp.UI" Version="7.1.2" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.8.5" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.240211001" />
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2365.46" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="5.0.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageVersion Include="Refit" Version="6.3.2" />
<PackageVersion Include="Refit.HttpClientFactory" Version="6.3.2" />
<PackageVersion Include="SkiaSharp" Version="2.88.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<DefaultLanguage>en</DefaultLanguage>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<!--<WindowsPackageType>None</WindowsPackageType>-->
<EnableMsixTooling>false</EnableMsixTooling>
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>

<PropertyGroup><!-- Bundles the WinAppSDK binaries (Uncomment for unpackaged builds) -->
Expand Down Expand Up @@ -41,6 +41,7 @@
<PackageReference Include="IdentityModel.OidcClient" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Microsoft.Identity.Client" />
<PackageReference Include="Microsoft.Web.WebView2"/>
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="Refit" />
Expand Down Expand Up @@ -94,4 +95,33 @@

<Import Project="..\..\..\src\Uno.Extensions.Core.Generators\buildTransitive\Uno.Extensions.Core.props" />
<Import Project="..\TestHarness.Shared\TestHarness.Shared.projitems" Label="Shared" Condition="Exists('..\TestHarness.Shared\TestHarness.Shared.projitems')" />

<!--
This is a temporary workaround to avoid error "NETSDK1152: Found multiple publish output files with the same relative path:"
for Microsoft.Web.WebView2.Core.dll, with one coming from MsixContent and the other from the Microsoft.Web.Webview2 Nuget package.
If both are present, we only keep the one from the NuGet package. See https://github.com/unoplatform/uno/issues/14555.
-->
<Target Name="ResolveWebView2CoreDuplicates1" BeforeTargets="_ComputeResolvedFilesToPublishTypes" AfterTargets="ComputeFilesToPublish">
<Message Importance="high" Text ="Applying workaround to resolve Microsoft.Web.WebView2.Core.dll duplication in package (1)" />
<ItemGroup>
<_WebView2CoreFilesToExclude Include="@(ResolvedFileToPublish)" Condition="'%(Filename)' == 'Microsoft.Web.WebView2.Core'"/>
</ItemGroup>
<ItemGroup Condition="'@(_WebView2CoreFilesToExclude->Count())' &gt; 1">
<_WebView2CoreFilesToExclude Remove="@(_WebView2CoreFilesToExclude)" Condition="$([System.String]::Copy(%(FullPath)).Contains('.nuget'))"/>
<ResolvedFileToPublish Remove="@(_WebView2CoreFilesToExclude)" />
</ItemGroup>
<Message Importance="high" Text ="Removed: @(_WebView2CoreFilesToExclude)" />
</Target>

<Target Name="ResolveWebView2CoreDuplicates2" BeforeTargets="_ComputeAppxPackagePayload" AfterTargets="GetPackagingOutputs">
<Message Importance="high" Text ="Applying workaround to resolve Microsoft.Web.WebView2.Core.dll duplication in package (2)" />
<ItemGroup >
<_WebView2CoreOutputsToExclude Include="@(PackagingOutputs)" Condition="'%(Filename)' == 'Microsoft.Web.WebView2.Core'"/>
</ItemGroup>
<ItemGroup Condition="'@(_WebView2CoreOutputsToExclude->Count())' &gt; 1">
<_WebView2CoreOutputsToExclude Remove="@(_WebView2CoreOutputsToExclude)" Condition="$([System.String]::Copy(%(FullPath)).Contains('.nuget'))"/>
<PackagingOutputs Remove="@(_WebView2CoreOutputsToExclude)" />
</ItemGroup>
<Message Importance="high" Text ="Removed: @(_WebView2CoreOutputsToExclude)" />
</Target>
</Project>

0 comments on commit 76a69ad

Please sign in to comment.