Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jul 12, 2013 11:58 pm Post subject: Could not load file or assembly AssemblyLoaderx86 on Win8 |
|
|
If your application is compiled using .NET 2 or 3 and you run the application on Windows 8 (which does not have these frameworks installed by default) then a warning is displayed stating that .NET 2/3 is required and you are given the option to install .NET 2/3 or to try running the application anyway (under .NET 4). If you select the latter option then the following error may occur (or the application may just hang):
Quote: | An unhandled exception (Could not load file or assembly AssemblyLoaderx86 ...) occurred while bootstrapping the application |
It is possible to get.NET 2/3 applications to run under .NET 4 (without any warning messages) by adding a config file for the executable that specifies the supported .NET runtimes. However when your application uses mixed mode assemblies (which contain managed and unmanaged code) like AssemblyLoaderx86 you need an additional flag (useLegacyV2RuntimeActivationPolicy) in the config file to make this work properly. The required config file is shown below:
Code: | <?xml version="1.0" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration> |
_________________ Infralution Support |
|