-
-
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
Net Core/Net 5 - Implementation #3197
Comments
- Make Wpf/WinForms/OffScreen projects target AnyCPU Only the VC++ projects are platform specific now. - Remove BrowserSubProcess project reference Not needed as we now have a standalone exe - Add OffScreen example - Add WPF Example project - Fix some compile errors for main solution - Add BrowserSubProcess executable - JavascriptObjectRepository remove isAsync param Rather than throw exception remove the option - BrowserSubprocess Exclude the WCF specific code from the netCore project - Add some ifdef/ifndef to exclude the WCF specific implementation - Move WCF implementation into separate namespace
diff --git a/CefSharp.Native.props b/CefSharp.Native.props
index d34636ef..521c31cf 100644
--- a/CefSharp.Native.props
+++ b/CefSharp.Native.props
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Target Name="AfterBuild">
- <ItemGroup>
- <!-- We only need the .exe and .pdb but I don't know how to express that easily with MSBuild... -->
- <SubProcessFiles Include="$(SolutionDir)\CefSharp.BrowserSubprocess\bin\$(Platform)\$(Configuration)\CefSharp.BrowserSubprocess.*" />
- </ItemGroup>
- <Copy SourceFiles="@(SubProcessFiles)" DestinationFolder="$(TargetDir)" />
- </Target>
+ <Target Name="CefSharpCopyBrowserSubprocess" AfterTargets="AfterBuild">
+ <ItemGroup>
+ <!-- We only need the .exe and .pdb but I don't know how to express that easily with MSBuild... -->
+ <!-- netcore -->
+ <SubProcessFiles Include="$(SolutionDir)\CefSharp.BrowserSubprocess\$(BaseOutputPath)\$(Configuration)\$(TargetFramework)\CefSharp.BrowserSubprocess.*" Condition=" '$(TargetFramework)' != '' " />
+ <!-- netframework -->
+ <SubProcessFiles Include="$(SolutionDir)\CefSharp.BrowserSubprocess\bin\$(Platform)\$(Configuration)\CefSharp.BrowserSubprocess.*" Condition=" '$(TargetFramework)' == '' " />
+ </ItemGroup>
+ <Copy SourceFiles="@(SubProcessFiles)" DestinationFolder="$(TargetDir)" />
+ </Target>
<Target Name="CefSharpCopyLibs86" BeforeTargets="AfterBuild" Condition="'$(Platform)' == 'x86'">
<Message Importance="high" Text="Copying cef.redist x86 files" /> |
Thanks for the tip, was very helpful. I've created a new targets file for the copying as I anticipate additional changes in the future. This should be resolved in commit 4505fdf |
- In preparation for adding a Net Core Specific XUnit project file Issue #3197
|
Quickly revisiting the idea of using a symbol Nuget package, seems like that it's not possible for VC++ projects.
As per https://github.com/dotnet/sourcelink#alternative-pdb-distribution |
I've spent quite a bit of time on this and can generate source for the It will be simpler to simply use the built in reference assembly generation for the What I've hacked together so far is at https://github.com/amaitland/CefSharp/tree/genapi (currently using GenApi to generate source for each of the csproj files). Not clear what properties the assemblies should actually have, should they be strongly signed? Need to investigate what .Net generates itself. |
If we create a CefSharp.Core.RefAssembly project, reference CefSharp.Core, install GenApi I'm wondering if we can execute GenApi as a prebuild step referencing CefSharp.Core and have the project in turn compile the generated source to produce a ref assembly. I'll try this next. |
- Produce ref assembly for Release builds only #3197
JetBrains have a new tool for generating ref assemblies at https://github.com/JetBrains/Refasmer with an article on their blog at https://blog.jetbrains.com/dotnet/2020/08/05/generate-reference-assemblies-with-refasmer/ There doesn't appear to be a public set of nuget packages yet. |
Article on creating ref assemblies see https://claires.site/2018/07/03/create-and-pack-reference-assemblies/ and https://claires.site/2018/07/09/create-and-pack-reference-assemblies-made-easy/ |
With commits 76c7918 and 159a45b we can now generate a ref assembly for the |
Build Net Core projects using the VS 2019 build worker image. No custom build script yet, nuget packages are only created for our Net Full build Issue #3197
dotnet restore doesn't like the vcxproj files, trying msbuild restore instead Issue #3197
dotnet restore and msbuild doesn't like the vcxproj files use nuget restore directly for the two vcxprojs Issue #3197
before_build is interpreting our commands as one, split them Issue #3197
Switching to using I'll hopefully finish this tomorrow/friday and release the first |
|
A new build is available on https://cef-builds.spotifycdn.com/index.html so I'll upgrade before pushing out the first |
The first
The minimum required (Nobody had a better name, so sticking with NETCore for now, will likely move the current packages over to a |
Thanks a lot for your work on this! I'm using Without a runtime identifier, the main application itself starts successfully (it correctly loads
However, this isn't a problem for us as we are OK with setting the |
Thanks, great feedback. For the I've added that to the |
- Add Initializer.BrowserSubProcessCorePath which is calculated the same as BrowserSubProcessPath - Update SelfHost to use new path then fallback to old path. Details in #3197 (comment)
- Add Initializer.BrowserSubProcessCorePath which is calculated the same as BrowserSubProcessPath - Update SelfHost to use new path then fallback to old path. Details in #3197 (comment)
Note that placing PDB files in the For example, the generated "CefSharp.Common.NETCore/87.1.130-pre": {
"dependencies": {
"chromiumembeddedframework.runtime": "87.1.13"
},
"runtime": {
"runtimes/win-x64/lib/netcoreapp3.1/CefSharp.Core.Runtime.dll": {
"assemblyVersion": "87.1.130.0",
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/lib/netcoreapp3.1/CefSharp.Core.dll": {
"assemblyVersion": "87.1.130.0",
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/lib/netcoreapp3.1/CefSharp.dll": {
"assemblyVersion": "87.1.130.0",
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/lib/netcoreapp3.1/Ijwhost.dll": {
"fileVersion": "3.100.1020.51903"
}
},
"native": {
"runtimes/win-x64/native/CefSharp.BrowserSubprocess.Core.dll": {
"assemblyVersion": "87.1.130.0",
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/native/CefSharp.BrowserSubprocess.Core.pdb": {
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/CefSharp.BrowserSubprocess.dll": {
"assemblyVersion": "87.1.130.0",
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/native/CefSharp.BrowserSubprocess.exe": {
"fileVersion": "87.1.130.0"
},
"runtimes/win-x64/native/CefSharp.BrowserSubprocess.runtimeconfig.json": {
"fileVersion": "0.0.0.0"
}
}
}, Notice the entry with
I think the issue is similar to this one in Microsoft.Data.SqlClient: dotnet/SqlClient#644 (comment) This doesn't seem to happen when the .dll and .pdb files ( Is it possible to not include the |
Firstly The managed dlls have the pdb embedded into the dll. From a support point of view having a Publishing a
For this release that might be the simplest option. Moving the files back into the |
Short term workaround for #3197 (comment)
…lder Leave the pdb in the lib folder for now, won't be copied, it will be in the package if required #3197 (comment)
Understood, thank you! |
Short term workaround for #3197 (comment)
…lder Leave the pdb in the lib folder for now, won't be copied, it will be in the package if required #3197 (comment)
This should hopefully be fixed in b5118b5
I've decided to just move the I'll release another |
The |
Hi @amaitland Thanks for putting in the effort to migrate CefSharp to .Net Core/.Net 5! I have some questions related to this:
Thanks |
@PaulParau Likely in the next few days. Subscribe to release only notifications here on GitHub to be notified.
See #3284 Also there are problems compiling the VC++ projects with .Net 5.0, so technically I cannot create a successful build. As .Net 5.0 is backwards compatible with .Net Core 3.1 is there a specific reason you require an upgraded version? |
Awesome, thanks!
I wasn't sure whether the .Net Core 3.1 version would be usable within a .Net 5 app, but it seems that they are compatible. So no specific reason to upgrade to 5 at this time. |
Further enhancements will be made as part of #3388 |
Track the progress remaining on actually compiling the project with .Net Core
Basic support for compiling with .Net Core was added with #3181 with additional commit (e8cf336) to get the core projects compiling/tests passing,
GenApi
Reference Assembly
generation as relies onx64
hardcoded in project file. See Net Core/Net 5 - Implementation #3197 (comment)ijwhost.dll
see C++/CLI libraries may fail to load due toijwhost.dll
not being on the search path dotnet/runtime#38231 and Ijwhost.dll loading not always working for C++/CLI assembly. dotnet/runtime#37972 (comment)ijwhost.dll
as required to loadC++/CLI
chromiumembeddedframework.runtime.json
.targets
file as detailed in Net Core/Net 5 - Implementation #3197 (comment)Net Core
variant).BrowserSubProcess
to support running on.Net 5.0
when.Net Core
is not installed..Net Core
specific Nuget Readme.txtVC++ 2019
is required for.Net Core
(add to readme, document in other places).SelfHost
forNet Core
determineCefSharp.BrowserSubprocess.Core.dll
path based on.exe
path (details in Net Core/Net 5 - Implementation #3197 (comment))OffScreen
The text was updated successfully, but these errors were encountered: