-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust references in .props files for .NET Core projects #2895
Conversation
-Add a reference to CefSharp.BrowserSubprocess.Core when compiling for .NET Core (see cefsharp#2891). -Adjust the references for .NET Core to not specify <Private>False<Private>, as otherwise they wouldn't be specified in the generated .deps.json file and so the CoreCLR wouldn't load them. Contributes to cefsharp#2796
✅ Build CefSharp 76.1.90-CI3277 completed (commit bf5d00ebdf by @kpreisser) |
This part baffles me, will need to do some more digging before I'm prepared to accept this change. Currently I don't have space to install Happy to merge the additional |
Sorry, this should actually read "
Note that it's also possible to just install the .NET Core 3.0 SDK and then run e.g. I don't know the technical details, but when you build a .NET Core project, a {
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.0": {
"CefSharp.MinimalExample.WinForms.netcore/1.0.0": {
"dependencies": {
"CefSharp.WinForms": "75.1.142",
"CefSharp.Core": "75.1.142.0",
"CefSharp": "75.1.142.0",
"CefSharp.WinForms.Reference": "75.1.142.0"
},
"runtime": {
"CefSharp.MinimalExample.WinForms.netcore.dll": {}
}
},
...
"CefSharp.WinForms.Reference/75.1.142.0": {
"runtime": {
"CefSharp.WinForms.dll": {
"assemblyVersion": "75.1.142.0",
"fileVersion": "75.1.142.0"
}
}
}
}
},
...
} Now, when an assembly reference like Then, when running the application, it cannot load
Setting Thank you! |
Free space permitting I'll install |
Hi @amaitland, did you already have a chance to look into this? Thanks! |
I did, there are a couple off issues that relates to the problem on I'm thinking instead of adding additional hacks to make I'm reluctant to merge this based on that, I'd rather not encourage people to use the current packages. |
Thank you! |
Hello Guys, there was a big migration to .NET Core...I have an issue to run the BrowserSubProcess wrote In C# in CefSharp solution, I got badFormatedImageException all the time. I have some difficult to understand why CefSharp.Common.NETCore does not contain CefSharp.BrowserSubprocess.Core.netcore .dll. I'm using the latest version from myget.org. Can you help me? Thank you! |
The project can be compiled with .Net Core, that part is correct. Issue #3197 is still open and you can subscribe to it for progress updates. The NetCore set of packages on myget aren't usable yet, the Badimageformatexception is actually misleading. You can use the current Nuget packages in .Net Core details at https://github.com/cefsharp/CefSharp.MinimalExample#net-core-support Further questions please ask on https://gitter.im/cefsharp/CefSharp |
Issue #2796
Summary:
<Reference>
elements in the NuGet.props
file for better .NET Core supportChanges:
CefSharp.BrowserSubprocess.Core
is added, so that the app executable can run the subprocess logic (after BrowserSubprocess - Refactor to support .Net Core #2891 is done).<Private>False</Private>
is no longer specified for the CefSharp assemblies in .NET Core projects, as otherwise these references would not be added to the generated.deps.json
file and the CoreCLR wouldn't load them.(Note that this probably means we cannot support
AnyCPU
for .NET Core, but I think we can ignore that for now because e.g. when you publish a self-contained .NET Core application, it will already be platform-specific.)Note: The
CefSharp.BrowserSubprocess.exe
file (using .NET Framework 4.5.2) is still copied to the output directory for .NET Core projects.How Has This Been Tested?
Tested by running
build.ps1
, and then using the built.nupkg
packages (via local NuGet package source) in theCefSharp.MinimalExample.NetCore.*
projects (see cefsharp/CefSharp.MinimalExample#57), and removing the<Reference Update="CefSharp">
elements to verify the assemblies are correctly loaded by the runtime.Additionally, I tested the new packages with the existing
CefSharp.MinimalExample.*
projects to verify classic .NET Framework projects usingpackages.config
still work as expected.Screenshots (if appropriate):
Types of changes
Checklist: