Which .Net framework?

Joined
Mar 14, 2014
Messages
12
Programming Experience
10+
I compiled a program in 4.51, which of course wouldn't run on my wife computer using 4.0. I compiled in 4.0, but wouldn't run on my 4.51. Do I need to have a compiled version for every version of.net that I want to share with? Makes updated difficult. Any suggestions?
Thanks!
 
The idea is that you target the version that you need and then you tell your users that they need that version installed. If you're not actually using any features specific to 4.5.1 then there's not really any point targeting it.

That said, while I've never actually tried to confirm this, I was under the impression that 4.5.1 was an extension of 4.5 and that was an extension of 4.0, the way 3.5 extends 3.0 and that extends 2.0. If that is the case then that means that anyone with 4.5.1 installed already has 4.5 and 4.0. When you targeted 4.0 and then tried to run on your machine with 4.5.1, what actually happened?
 
When I tried to run the 4.0 build in the 4.51 machine, I got the not a valid windows application error. This is the same error I get running the 4.51 on the 4.0 machine. I can't upgrade the 4.0 machine because it runs windows xp.
 
When I tried to run the 4.0 build in the 4.51 machine, I got the not a valid windows application error. This is the same error I get running the 4.51 on the 4.0 machine. I can't upgrade the 4.0 machine because it runs windows xp.

Well, if you want to support Windows XP and Windows XP cannot run anything above .NET 4.0 then it should be fairly obvious that you can't target anything higher than .NET 4.0. I am surprised that an application targeting .NET 4.0 doesn't run on a machine with .NET 4.5.1 though. As I said, I've never actually tried to confirm it but I was under the impression that 4.5.1 was a superset of 4.5, which was a superset of 4.0. I'll do a bit of research to either confirm or deny that, for my own peace of mind if nothing else. Have you seen anything on the web from other people having a similar problem?
 
Back
Top