Using .Net Framework version 4 with Truevision3D and Visual Studio 2010

.NET 4.0 has changed the way that it binds to mixed mode assemblies. When your code reaches the point of creating the new engine object you will receive the error message...

Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

The good news for our applications is that you have the option of falling back to .NET 2.0 era binding for these assemblies by setting an app.config

Windows applications in VS.NET use the name app.config by default for the configuration file. This will not be automatically created when you create a Windows application. If you need a configuration file for your application, open your project in VS.NET, go to the ‘Solution Explorer’ and right click on the project name. Choose Add > Add new item from the menu and select ‘Application Configuration file’ from the list of choices. This will create an app.config file for you in the application root.

Edit your application file to read:-

<?xml version="1.0" encoding="utf-8" ?>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
tv3d/using_net_framework_4.txt · Last modified: 2013/11/22 13:31