Skip to content

Using CefSharp with .NET 4 applications

fddima edited this page Dec 24, 2010 · 2 revisions

While CefSharp.dll is mixed mode assembly targeted to .net framework 2.0, it can not be loaded in .net 4 application with default way.

When you try load this assembly you got followed exception:

System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and 
cannot be loaded in the 4.0 runtime without additional configuration information.

It can be solved with set attribute useLegacyV2RuntimeActivationPolicy to true in startup element of configuration file.

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
Clone this wiki locally