Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Upgrade to CefSharp 89.0.170 #3

Merged
merged 4 commits into from
Apr 6, 2021
Merged

Conversation

amaitland
Copy link
Contributor

@amaitland amaitland commented Mar 5, 2021

I've had to remove the netstandard2.0;netstandard2.1 targetframeworks, it's not possible to target .Net Standard.

C++/CLI doesn't support targeting .Net Standard, so CefSharp cannot produce a netstandard lib. For reference https://docs.microsoft.com/en-us/dotnet/core/porting/cpp-cli

It wasn't really ever supported. The CefSharp nuget packages are now more standardises and include most of the managed libs in the lib\net452 folder, so the netstandard target won't resolve to those (at least in my experience).

Switched to using a dependency group option where the appropriate nuget package is included based on the targetFramework.

  • Remove x86/x64 platforms from the solution
  • Chromely.CefSharp.Integration.TestApp sets RuntimeIdentifier based on host OS
  • Change TargetFrameworks to net462;netcoreapp3.1;net5.0-windows
  • Update Chromely.CefSharp lib with breaking changes introduced in version 87.

KNOWN ISSUES

  • The generated Nuget package has exclude buildTransitive set which will likely break the package (not tested, though very likely)
    The CefSharp.Common.NETCore.targets included in the buildTransitive folder has a hack to support AnyCPU which adds package references
    directly to the chromiumembeddedframework.runtime.win-x64 and chromiumembeddedframework.runtime.win-x86 packages
    Will need to add some configuration options to CefSharp to disable this behaviour, I've added a task to Net Core/Net 5 - Enhancements cefsharp/CefSharp#3388

Because of the known issue listed above a workaround would be required, two untested options are:

  • Add CefSharp.Common or CefSharp.Common.NETCore as a direct PackageReference
  • Set IncludeAssets on the PackageReference

Need to clone https://github.com/chromelyapps/demo-projects and test out the resulting nuget package.

- Remove x86/x64 platforms from the solution
- Chromely.CefSharp.Integration.TestApp sets RuntimeIdentifier
- Change TargetFrameworks to net462;netcoreapp3.1;net5.0-windows

**KNOWN ISSUES**
- The generated Nuget package has exclude buildTransitive set which will likely break the package (not tested, though very likely)
  The CefSharp.Common.NETCore.targets included in the buildTransitive has a hack to support AnyCPU which adds package references
  directly to the chromiumembeddedframework.runtime.win-x64 and chromiumembeddedframework.runtime.win-x86 packages
  Will need to add some configuration options to CefSharp to disable this behaviour, I've added a task to cefsharp/CefSharp#3388
@amaitland
Copy link
Contributor Author

@mattkol
Copy link
Member

mattkol commented Mar 9, 2021

For future reference https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#assettargetfallback

Thanks for the info. Will see about merging this by the weekend.

@amaitland
Copy link
Contributor Author

Will see about merging this by the weekend.

To resolve the transitive dependency issues a few changes are required to the CefSharp Nuget packages. I'll post an update when they're done and tested.

@mattkol
Copy link
Member

mattkol commented Mar 14, 2021

Standing by ...
Thanks.

@amaitland amaitland changed the title Upgrade to CefSharp 88.2.90 Upgrade to CefSharp 89.0.140-pre Mar 25, 2021
@amaitland
Copy link
Contributor Author

I've upgraded to 89.0.140-pre which includes the required fixes. The basic demo runs as expected.

@amaitland amaitland changed the title Upgrade to CefSharp 89.0.140-pre Upgrade to CefSharp 89.0.170 Apr 5, 2021
@amaitland amaitland marked this pull request as ready for review April 5, 2021 06:04
@amaitland
Copy link
Contributor Author

I've upgraded to 89.0.170, the resulting Nuget package structure looks correct when I extract the resulting nupkg file.

Should hopefully be good to go.

@mattkol mattkol merged commit bb5cb80 into chromelyapps:master Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants