- Installed Visual Studio 2022 (on a clean/fresh Windows 11 installation), installed Template Studio for WinUI (v5.3).
- Created a Project using Template Studio with these Settings:
- 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:
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:
- I tried adding the following propertyto my .csproj files, as suggested in this answer here
<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?