Replies: 2 comments 2 replies
-
thanks for fixing the minimal example. i just did a publish and it has the same issue, libcef and related parts are missing |
Beta Was this translation helpful? Give feedback.
-
Converted to discussion as what you are seeing is fundamentally NuGet/Home#10571 When a RuntimeIdentifier is specified, the build/publish will copy platform specific resources e.g. In development we hack around this by adding the I always recommend setting a
You can use the new
It's my understanding that I'd encourage you to analyse your exe to see what You can technically use I believe publishing multiple platform specific builds of your application is the recommended approach. |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
CefSharp Version
112.2.70
Operating System
Windows 10
Architecture
AnyCPU
.Net Version
.Net 6
Implementation
WPF
Reproduction Steps
For a client we are building a WPF application in .net 6 and have switched from WebView2 to CefSharp because WebView2 is rendered in a winforms control, which is always on top of the wpf controls even if we use a popup.
Anyway, when doing a dotnet publish of the project, some files are missing just like described in #4022
However, that issue was for a .net framework project and the solution didn't work + it looks kinda ugly and not ok.
After we imported the CefSharp from nuget, this is what our csproj looked like
clean as a whistle, as it should be. except im not sure why it added the 3 update package references...
hell, we won't even be needing the arm64 one..
anyway, one publish later and the win-64 runtime of CefSharp is missing in the result.
in a build its there, in a publish it is not.
after changing the PackageReferences for chromiumembeddedframework.runtime.* packages to include, and ignoring the build warning that they are already included, i do get the correct output and all runtime libraries are there.
this makes me believe there is something wrong in the package's configuration/inclusion/publish settings
however, i don't know what as usually all default settings for any package works just fine even for packages i manage myself :/
the final csproj we have now :
on top of that, i was diging around and there were a lot of mentions of the MinimalExample repo ( https://github.com/cefsharp/CefSharp.MinimalExample ). however, that one didn't even compile as the functions used in the (imo weird main override) are not found. also, its .netcore csproj is full of things that are not applicable.
As proven by my project here, i don't even think that the Main override is needed?
Anyway, i would love to see this resolved!
Thanks for your time!
Expected behavior
Runnable, published, package of application
Actual behavior
application crash on startup because of missing libraries not exported during publish
Regression?
No response
Known Workarounds
change generated PackageReferences to include, even if they are already included by the CefSharp.Core.Wpf package
Does this problem also occur in the CEF Sample Application
Not Tested
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions