Microsoft has broken .NET compatibility?

A few days ago my .NET 3.5 applications started crashing when starting an error

"Unable to find runtime version to run this application."

Since I did nothing with them, it looked strange to me. After some investigation, I found that the reason was an automatic Windows update that installed the service pack for .NET 3.5 or .NET 4 on my computer (I did not understand which of the two was guilty). This update could not be removed because it was not shown in the Installed Windows Updates list in Control Panel. I had to go back to the system restore point!

Today, one of my clients complained about the same problem. I can't get him to return to system recovery, so I need to know how to overcome this stupid Microsoft thing. Can anyone share their ideas?

PS The software is protected by CodeVeil 1.2, perhaps that matters.

+4
source share
3 answers

Thank you all for your help!

I finally realized that this is the old CodeVeil that was guilty of destroying the application. After installing the .NET 4.0 update, all applications protected by CodeVeil 1.2 were completely damaged. I bought the latest version of the product and now it works.

+1
source

Before we can propose a fix for this, we need to understand what is happening here. The first step to solving this is to get a little more information.

  • What version of the CLR is this application compiled against?
  • What versions of the CLR are installed on the machine?
  • What operating system is the machine?

This error message usually occurs when the application is compiled for a version of the CLR that is not installed on the computer. For example, having an application 2.0, but only 4.0 CLR.

+2
source

In my case, the problem was easily solved by adding the previous version at run time to the app.config file, as described here https://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx

<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="<YOUR_VERSION>"/> </startup> </configuration> 

In your case, following the above document should be "v2.0.50727", because this line also displays as .NET 3.5.

The list of possible versions is https://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx

-1
source

Source: https://habr.com/ru/post/1314045/


All Articles