yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.64k forks source link

"Fixed 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". Error #217

Open GustavPS opened 9 years ago

GustavPS commented 9 years ago

Hi! I get an error with my application after I "confuse" it. I had this problem with my application before and I fixed that by adding

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />
  </startup>

in the App.config but now after I "confuse" my application I get that error again. Does the program do anything with my App.config since this don't happen if I have that code in there.

I appriciate all help!

yck1509 commented 9 years ago

Hi, What settings did you use? Do you have any sample that allows me to reproduce the problem?

GustavPS commented 9 years ago

Hi! Thank you for your answere. Well im using a dll called "simconnect" to make plugins for Microsoft flight simulator (https://msdn.microsoft.com/en-us/library/cc526983.aspx). Im using maximum settings and no packer on confuserEx but I've tried with packer and every preset for security.

Here is one of the projects I made that got this issue: https://mega.co.nz/#!tltmmJjY!ycWKF0fGX0NukCCUjwfrF_CqRkMYqgVP0FQISRKGytc

The files that I tried to "confuse" is in the bin/x86/release folder and it's the "Microsoft.FlightSimulator.SimConnect.dll" and the "WindowsFormsApplication1.exe" file

yck1509 commented 9 years ago

Hi, Sorry but both of your original and protected application cannot run here. It seems to be a problem with different framework version. You may try changing the framework version of your project from .NET 4 to .NET 2/3.5 to see if it solves the problem.