Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have created program in C# [^] , IDE SharpDevelop [^] and compile it with compiler options :

target framework set to .Net framework ver 2.0. and
target CPU set to any processor

It runs perfectly on computers that have .net 2.0 installed, regardless type of processor.

But, when I try to start program on computer with .net 4.0 installed, it do not work.
There is message about wrong .net framework when I try to start program.

What could be the problem ?

For some reason I allways tought that newer versions of .net framework supports programs written for older ones.

What I have tried:

Only one possible thing, redistribute .net 2.0 zip library, with exe version of program so that users can install it on their computers if necessary.

This solution is inadequate because it raises cost of program download,
expressed as the amount of data that is necessary to download.
Posted
Updated 21-Aug-16 1:19am
Comments
Ralf Meier 21-Aug-16 6:57am    
Perhaps there is no difference to be seen for you. But your application requests exactly this .Net-Framework-Version which you have taken to build it.
Perić Željko 23-Aug-16 3:56am    
Thanks
Maciej Los 22-Aug-16 7:01am    
Perić Željko 23-Aug-16 3:54am    
Thanks for link

EXE's built with .net have a special loader which checks the version of .net installed with the one it was built on and will give a message if they don't match.

Note
: .net version breaking CLR changes were 1.0, 1.1, 2, 4 (i.e. 3 and 3.5 run on 2 with additions)

Note
: you can build .net 2 dll's and run them on 4 built EXE's with only .net 4 CLR installed.
 
Share this answer
 
Comments
Perić Željko 23-Aug-16 3:56am    
Thanks for suggested solution
Finally I have found list of differences at this link :

.NET Framework version history - Wikipedia, the free encyclopedia[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900