-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2205 from unoplatform/dev/nr/webview2authworkaround
fix: Moving windows/webview2 workaround to auth MSAL library targets
- Loading branch information
Showing
2 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
37 changes: 33 additions & 4 deletions
37
src/Uno.Extensions.Authentication.MSAL/build/Package.targets
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
<Project> | ||
<ItemGroup Condition=" '$(ImplicitUsings)' == 'true' OR '$(ImplicitUsings)' == 'enable' "> | ||
<Using Include="Uno.Extensions.Authentication.MSAL" /> | ||
</ItemGroup> | ||
</Project> | ||
<ItemGroup Condition=" '$(ImplicitUsings)' == 'true' OR '$(ImplicitUsings)' == 'enable' "> | ||
<Using Include="Uno.Extensions.Authentication.MSAL" /> | ||
</ItemGroup> | ||
|
||
<!-- | ||
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())' > 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())' > 1"> | ||
<_WebView2CoreOutputsToExclude Remove="@(_WebView2CoreOutputsToExclude)" Condition="$([System.String]::Copy(%(FullPath)).Contains('.nuget'))"/> | ||
<PackagingOutputs Remove="@(_WebView2CoreOutputsToExclude)" /> | ||
</ItemGroup> | ||
<Message Importance="high" Text ="Removed: @(_WebView2CoreOutputsToExclude)" /> | ||
</Target> | ||
</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