-
-
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
Add new projects targeting .NET Core 3.1 #3181
Conversation
…serSubprocess.Core, CefSharp.WinForms, CefSharp.Wpf, CefSharp.OffScreen. Contributes to cefsharp#2796
✅ Build CefSharp 83.4.2-CI3597 completed (commit 00cd22c599 by @kpreisser) |
…available for ARM64 and don't seem to be needed. - Clean up project files.
✅ Build CefSharp 83.4.2-CI3598 completed (commit ba213104eb by @kpreisser) |
…e different builds for each platform.
✅ Build CefSharp 83.4.2-CI3599 completed (commit a51c39185a by @kpreisser) |
… the .NET Core projects, to allow side-by-side builds with the .NET Framework projects.
✅ Build CefSharp 83.4.2-CI3600 completed (commit 04e78adafd by @kpreisser) |
Great, thank you 👍 I'll have a look in detail when I have a spare moment. |
just want to say thank you for this contribution! |
@kpreisser Are any further changes in the pipeline? I'll probably restructure a few things after merging, I'm thinking of moving all the |
@amaitland I also started to port |
✅ Build CefSharp 83.4.2-CI3604 completed (commit 9055cdfc1f by @kpreisser) |
…not used in the corresponding .NET Framework projects.
✅ Build CefSharp 83.4.2-CI3605 completed (commit bbb11c4c2d by @kpreisser) |
I've added the Wpf/OffScreen example projects and done some refactoring, I've also added a CefSharp.BrowserSubProcess I squashed the changes from this commit and have created branch https://github.com/amaitland/CefSharp/tree/enhancement/netcore31 There are lots of little things to resolve still.
The reason I haven't progressed with these changes sooner is actually an infastructure one, the current Appveyor build image only has VS2015 installed, so is unable to build the .Net Core 3.1 projects using VS2019. If we switch to the VS2019 build worker image it doesn't have VS2015 installed. If we compile with VS2019 we'll be forcing users to upgrade to VC++2019. Maybe it's possibly to get the a VC++2015 build for the .Net Full dlls from a VS2019 instance with some major hacking. I'm actually thinking we'll only include the new set of .Net Core dlls in the PackageReference nuget packages (#2795) and move the dependency to VC++2019 for those packages only. Primarily they'll be used for .Net Core 3.x development anyway so it shouldn't be a problem. AppVeyor can be setup to perform a matrix build, I'll look at that soon as I iron out these changes a little more. Hopefully the .Net Core dlls will resolve some of the issues I was having with Nuget/msbuild. Further details to follow in the next day or so. |
Hi @amaitland,
Thanks a lot for your work on this!
I agree it is reasonable to include the new .NET Core DLLs in the new packages only and require VC++2019 for them. Thanks! |
Soon as i have the unit tests passing again I'll merge this. I found an unrelated bug in the JavaScript Binding implementation (#3193) whilst debugging which took a little while to track down. I'm hoping to have this done this afternoon. |
Contributes to #2796
Summary:
This is a draft PR for adding new .NET Core 3.1 projects in addition to the .NET Framework 4.5.2 projects, using a ".netcore" suffix like in the minimal example (support for C++/CLI projects was added with .NET Core 3.1 and VS 2019 (16.5)).
Adding proper .NET Core 3.1 projects will have the following benefits:
CefSharp.Core.dll
andCefSharp.BrowserSubprocess.Core.dll
) no longer depend onmscoree.dll
, which can be missing on the system if the .NET Framework was uninstalled (e.g. on Windows Server).Changes:
CefSharp3.netcore.sln
along with new projects (CefSharp.netcore.csproj
,CefSharp.Core.netcore.vcxproj
,CefSharp.BrowserSubprocess.Core.netcore.vcxproj
,CefSharp.WinForms.netcore.csproj
,CefSharp.Wpf.netcore.csproj
,CefSharp.OffScreen.netcore.csproj
).obj.netcore
andbin.netcore
as their [intermediate] output paths, so that it's possible to build them side-by-side with the .NET Framework projects.CefSharp.Core.netcore.vcxproj
, I removed the references toopengl32.lib
andglu32.lib
as they don't seem to be needed and they are not available forARM64
.Note, I'm not very familiar with C++ and C++/CLI projects, so I'm not sure if the changes I made are entirely correct.
Later, the NuGet packages could be changed to include the
netcoreapp3.1
files for .NET Core 3.1 apps (or maybe wait until .NET 5.0 is released, and increase the target framework tonet5.0
).How Has This Been Tested?
I built the solution and then referenced the built DLLs in the
CefSharp.MinimalExample.WinForms.netcore
andCefSharp.MinimalExample.Wpf.netcore
projects (where I previously removed the existing references and increased the target framework tonetcoreapp3.1
). After adding the CEF redist files, the program run successfully.Note: When building C++/CLI projects targeting .NET Core, an additional file
ijwhost.dll
is placed in thebin
directory on which the built DLL depends (instead ofmscoree.dll
). That file must also be copied to the application'sbin
directory; otherwise, aBadImageFormatException
will occur.What do you think?
Types of changes
Checklist: