UPDATE: Starting with release v87.1.132 the Nuget
packages have been restructured to greatly simplify using AnyCPU
. Issue #3319 has some specific information.
Those upgrading from versions prior to v87.1.132
shouldn't need to make any code changes.
When targeting AnyCPU
when your project has Prefer 32bit
set to true
then the resulting exe
will be 32bit
, the Nuget
package checks for this and copies only the x86
files. This is the default for a number of Visual Studio
project templates. No further changes are required.
To manually set Prefer 32bit
open your project properties and under the build tab check prefer 32bit.
Add a dependency resolver, this is more complicated and needs to be hooked up before any calls to classes in the CefSharp.*
namespaces. Here is one method of doing this. It's important that LoadApp
is not in-lined, so the calls to CefSharp
are delayed long enough to hookup the Assembly Resolver
<CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>
to the first <PropertyGroup>
in your project (e.g. .csproj
file).[STAThread] public static void Main() { CefRuntime.SubscribeAnyCpuAssemblyResolver(); LoadApp(); } [MethodImpl(MethodImplOptions.NoInlining)] private static void LoadApp() { var settings = new CefSettings(); Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null); var browser = new BrowserForm(); Application.Run(browser); }
The MinimalExample now has AnyCPU
as a target to demo the CefSharpAnyCpuSupport
option.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4