The mixed mode assembly is built on version X and cannot be loaded into version Y at run time without additional configuration information

After refactoring the code, my VS2010 VB.Net Web Application project stopped compiling with the following error:

"The mixed-mode assembly is based on the runtime version v1.1.4322 and cannot be loaded into runtime 4.0 without additional configuration information."

In the "File" column in the Visual Studio error list, there is the word "SGEN", but double-clicking the file does not exist ("The document does not open, it was renamed, deleted, or moved.) I understand that this is due to serialization, but when I I delete the link to the Serialization library, the error does not disappear (and, of course, I get more errors, because now I'm trying to use the unreferenced library).

So what is the necessary additional configuration information? I spent several hours investigating the error, and everyone says to add the following to the configuration tab of the app.config file:

<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> 

However, I added this to every configuration file I could find or create, and so far this has not helped.

I suspect that Crystal Reports, DLL files for which the points network is actually created against v1.1.4322, may be part of the problem.

I need to assemble my project again. For this, I have a few questions:

  • In which configuration file should I add legacyRuntime configuration? Is this even the right decision?
  • Can someone help demystify Asp.Net configuration for me? Does it really make any sense or is it as funny as it seems?
  • Why does Visual Studio indicate an error that refers to a file that does not exist?
  • What is it in baloney mixed mode?
  • Why do strange configuration problems like this occur periodically, as far as I know, I have not made significant changes?
+4
source share
1 answer

I got a compilation project by changing Generate Serialization Builds from Auto to Off. in my application configuration. The advice around the world about useLegacyV2RuntimeActivationPolicy seemed like a red herring to my situation.

+7
source

All Articles