0

I have made a simple WPF app that uses cefSharp.wcf. I am trying to create a deployment package, but I cannot get the package to build. When I try and build the package I get the following errors :

The primary reference "C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.MinimalExample.Wpf\bin.netcore\x64\Debug\netcoreapp3.1\win-x64\CefSharp.MinimalExample.Wpf.netcore.dll" could not be resolved because it has an indirect dependency on the assembly "CefSharp.Wpf, Version=84.4.10.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" which was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1". 1>The primary reference "C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.MinimalExample.Wpf\bin.netcore\x64\Debug\netcoreapp3.1\win-x64\CefSharp.MinimalExample.Wpf.netcore.dll" could not be resolved because it has an indirect dependency on the assembly "CefSharp.BrowserSubprocess.Core, Version=84.4.10.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" which was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1". 1>The primary reference "C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.MinimalExample.Wpf\bin.netcore\x64\Debug\netcoreapp3.1\win-x64\CefSharp.MinimalExample.Wpf.netcore.dll" could not be resolved because it has an indirect dependency on the assembly "CefSharp, Version=84.4.10.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" which was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1". 1>The primary reference "C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.MinimalExample.Wpf\bin.netcore\x64\Debug\netcoreapp3.1\win-x64\CefSharp.MinimalExample.Wpf.netcore.dll" could not be resolved because it has an indirect dependency on the assembly "CefSharp.Core, Version=84.4.10.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" which was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1". 1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\MakePri.exe New -ProjectRoot C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.Wpf.Package\ -ConfigXml obj\x64\Debug\priconfig.xml -OutputFile C:\Users\paulc\source\repos\CefSharp.MinimalExample\CefSharp.Wpf.Package\bin\x64\Debug\resources.pri -IndexName e803bf3e-cc50-4fe6-b39b-7e06457e1413 -Verbose -Overwrite

Can anybody explain how I can get past this or add a dependency to .net framework 4.5.2 so that I can create the package?

Paul
  • 693
  • 1
  • 10
  • 25
  • I've never created a msix so only speculating here. Is there a dialog where you can select the framework dependencies? Config file you can edit? – amaitland Oct 22 '20 at 20:19
  • 1
    We are running it in our MSIX .wapproj and it compiles just fine. What about your `` in the .csproj files? You should have something like `` and nothing else referencing CefSharp. – Ernie S Oct 22 '20 at 21:24
  • thanks for the help. i literally cloned the .net core sample solution https://github.com/cefsharp/CefSharp.MinimalExample and added a packaging project and referenced the wpf application. The references look right. I think its to do with being a .net core app – Paul Oct 23 '20 at 11:55
  • I have the same issue. I tried to reference the wpf .netcore application from the desktop bridge project, but it couldn't package. It failed with the same error message. So, this means that the CefSharp could not be used in a WPF project, which targets .NETCore and I'd like to package via desktop bridge? – Attila Szász Nov 19 '20 at 15:17

0 Answers0