07-20-2023, 03:23 PM
I have a C# solution, two projects, a winforms and a dll, where the winforms project references to the dll, and I've set everything I know of in the project to the framework version 2.0, yet I still get this FileLoadException on startup:
> 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.
The settings I configured are:
- Properties - Target framework is .NET framework 2.0
- All references the project links to are built with .NET 2.0
- All checkboxes in the Configuration manager indicating whether the projects should be built are checked.
Also I've tried cleaning the solution, deleting the map project\bin\, but when the solution is recompiled and run, the exception is still thrown. On my machine I have Visual Studio 2010 Ultimate with both .NET 4.0 and .NET 3.5 SP1 installed.
I must have missed a setting which causes this exception, but I'm unaware of it, does anyone know ? I just want it to use .NET 2.0, not .NET 4.0.
> 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.
The settings I configured are:
- Properties - Target framework is .NET framework 2.0
- All references the project links to are built with .NET 2.0
- All checkboxes in the Configuration manager indicating whether the projects should be built are checked.
Also I've tried cleaning the solution, deleting the map project\bin\, but when the solution is recompiled and run, the exception is still thrown. On my machine I have Visual Studio 2010 Ultimate with both .NET 4.0 and .NET 3.5 SP1 installed.
I must have missed a setting which causes this exception, but I'm unaware of it, does anyone know ? I just want it to use .NET 2.0, not .NET 4.0.