- Project type: Navigation pane
- Design pattern: MVVM Toolkit
- Pages (Blank pages):
* Page1
* Page2
*
*
* Settings page
- Features:
* Settings Storage added
* MSIX Packaging added
* Self-Contained added
* App Notifications added
* Theme Selection added
- Testing: MSTest not added
Installed Microsoft.EntityFrameworkCore.SqlServer (to connect to my SQL Server).
After installing Microsoft.EntityFrameworkCore.SqlServer (Latest stable 7.0.4) and immediately after that trying to run an App I get the following error:
Found multiple publish output files with the same relative path:
D:\07_PROJECTS\Kratos365\Kratos365\obj\x64\Debug\net7.0-windows10.0.19041.0\win10-x64\MsixContent\Microsoft.Web.WebView2.Core.dll,
C:\Users\mladen\.nuget\packages\microsoft.web.webview2\1.0.864.35\lib\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll
Kratos365 C:\Program Files\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets 112
I did noticed whilst installing Microsoft.EntityFrameworkCore.SqlServer that Microsoft.Web.WebView2 (version 1.0.864.35) got installed as well as seen in this screenshot:
Screenshot
But I'm guessing (from the Error) that there is another version of Microsoft.Web.WebView2 in MSIX Packaging in the Project folder.
What I tried:
<PropertyGroup>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
But that gave me following error:
Payload contains two or more files with the same destination path 'Microsoft.Web.WebView2.Core.dll'. Source files:
D:\07_PROJECTS\Kratos365\Kratos365\obj\x64\Debug\net7.0-windows10.0.19041.0\win10-x64\MsixContent\Microsoft.Web.WebView2.Core.dll
C:\Users\mladen\.nuget\packages\microsoft.web.webview2\1.0.864.35\lib\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll
Kratos365 C:\Users\mladen\.nuget\packages\microsoft.windowsappsdk\1.2.230313.1\buildTransitive\Microsoft.Build.Msix.Packaging.targets 1504
I tried deleting the 'bin' and 'obj' folders from the Project folder and rebuilding solution but that gave me a bunch of other errors.
I tried uninstalling (Start menu > right click on it, uninstall), and then cleaning the solution in Visual Studio before trying to deploy it again, as suggested in this answer here
At this point I tried everything and anything that I could find online - posting a question here is my last resort
Could this be some weird Template Studio for WinUI / Microsoft.EntityFrameworkCore.SqlServer conflict?
In the end the solution was to downgrade Microsoft.EntityFrameworkCore.SqlServer NuGet Package from the Latest stable 7.0.4 down to 6.0.15.
Any version above 6.0.15 (7.0.0; 7.0.1; 7.0.2; 7.0.3; 7.0.4) that contained Microsoft.Web.WebView2 would spit out the Error Found multiple publish output files with the same relative path
I think it was some sort of Microsoft.Web.WebView2 version conflict from MSIX Packaging within Template Studio for WinUI and Microsoft.EntityFrameworkCore.SqlServer NuGet package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With