#347973 - 11/10/2011 17:27
Someone explain .NET versions to me
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
I want to install PowerShell2.0 on a Win2k3 system. I was told to go download and install .NET Framework 2.0. Stupid me figured that .NET Framework 4.0 would work fine. (It's two better, innit?) Turns out it's not.
I'm still uninstalling 4.0 and installing 2.0 (and getting stuck with the ununinstallable "Windows Imaging Component" that 4.0 required), but what the hell is with all the .NET versions?
ISTR that 2.0 obsoleted 1.1, but it seems that if I want it all installed (and why I would want that I don't know), I have to install versions 2.0. 3.5 and 4.0.
What I'm looking for is how they're different, why I would want one as opposed to another (other than specific software prerequisites), and how they manage to be completely distinct from each other.
Update: I finally finished installing 2.0, and now I have to install SP2. It's unclear if I needed to install 2.0 first, or if it's incorporated in the SP2 installation.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#347975 - 11/10/2011 17:54
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 08/06/1999
Posts: 7868
|
I can't really explain it, but my general handling was to always install via Microsoft Update. I figure it's got at least some sense in the order that things should be installed in. SP2 is likely a newer rollup of all the previous .Net 2.0 security patches, and would have to be installed after 2.0.
|
Top
|
|
|
|
#347976 - 11/10/2011 18:35
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
pooh-bah
Registered: 06/04/2005
Posts: 2026
Loc: Seattle transplant
|
I never understood it either. After glancing over the wikipedia article I still don't. http://en.wikipedia.org/wiki/.NET_FrameworkCertainly *looks* like it's explaining something, though. Maybe my brain is too dense. At any rate, I think it's 3.5 that's the 'catch all' installation.
_________________________
10101311 (20GB- backup empeg) 10101466 (2x60GB, Eutronix/GreenLights Blue) (Stolen!)
|
Top
|
|
|
|
#347979 - 11/10/2011 20:37
Re: Someone explain .NET versions to me
[Re: drakino]
|
carpal tunnel
Registered: 08/03/2000
Posts: 12343
Loc: Sterling, VA
|
I can't really explain it, but my general handling was to always install via Microsoft Update. I figure it's got at least some sense in the order that things should be installed in. SP2 is likely a newer rollup of all the previous .Net 2.0 security patches, and would have to be installed after 2.0. I can't agree with Tom more on this one. Definitely go through Windows Update for things like this, as it certainly has an order to the way it likes to do things. Didn't we have something just like this in regards to updates in another thread?
Edited by Dignan (11/10/2011 20:38)
_________________________
Matt
|
Top
|
|
|
|
#347980 - 12/10/2011 00:21
Re: Someone explain .NET versions to me
[Re: drakino]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
The thing that you can download from Microsoft's site seems to include 2.0 and SP2. It installed on its own after uninstalling plain-flavor 2.0. I've got more machines to run this on, so I can doublecheck.
I didn't even think about installing it through Windows Update. I forgot that there are optional packages available through there. However, I'm trying to automate some software installations, and Windows Update isn't exactly conducive to that.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#347981 - 12/10/2011 07:27
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Microsoft's marketing department do love to confuse matters. .NET 2.0, 3.0 and 3.5 (and their various service packs) all use the 2.0 version of the Common Language Runtime specification (i.e. the main library that makes everything work). So code built for .NET 2.0 should work fine on all of them (unless of course you get an odd case where a bug fixed in the CLR over the period breaks something). What 3.0 and 3.5 do is add extra functionality in extra separate libraries. It would have been a lot less confusing for everyone if the naming had made that clear
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347982 - 12/10/2011 07:28
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
The command line version of the Web Platform Installer can be a useful way to get .NET and other dependancies installed.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347984 - 12/10/2011 12:13
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
So if I need 2.0, I should be able to install 3.5 instead? And probably should?
And 4.0 is (binary) incompatible?
_________________________
Bitt Faulk
|
Top
|
|
|
|
#347985 - 12/10/2011 12:15
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
WPI still means I'll have to redownload the Framework on every installation.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#347986 - 12/10/2011 12:44
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
So if I need 2.0, I should be able to install 3.5 instead? And probably should? Yes. And 4.0 is (binary) incompatible?
That I'm not 100% sure of. I think that stuff built for an earlier version is supposed to work against the newer version of the CLR, except where it calls stuff that has had breaking changes. But I could be wrong, if I have stuff that was built for CLR 2.0 I make sure I have CLR 2.0 installed...
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347987 - 12/10/2011 12:45
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
WPI still means I'll have to redownload the Framework on every installation. There is some stuff coming for it that lets you setup a local cache of the dependancies, like the CLR. But I don't think they've released it yet.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347989 - 12/10/2011 14:15
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
|
And 4.0 is (binary) incompatible?
That I'm not 100% sure of. I think that stuff built for an earlier version is supposed to work against the newer version of the CLR, except where it calls stuff that has had breaking changes. But I could be wrong, if I have stuff that was built for CLR 2.0 I make sure I have CLR 2.0 installed... Agreed. I've had packages require me to install .NET 2.0, even though I already had 4.0 installed. Highly confusing.
|
Top
|
|
|
|
#347992 - 12/10/2011 15:19
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
|
2.0 vs 3.5 is the really weird one. 3.5 is just 2.0 with stuff added.
Like Andy, if I'm deploying a 2.0 project I make sure 2.0 is installed. All of these versions of .net can live along side each other.
Basically, I'd run whatever it is that needs to be run- either it will work or it won't. You won't get a situation of strange behavior by having the wrong version installed.
The reason for all of the versions is that MS has been constantly improving the capabilities of the .net framework, and overall they've been really good improvements. Being used to working in 4.0, I really struggle when I move back to 2.0 projects (which I've had to do recently). Yes, we get pampered with all the new stuff- but at least it's not bloat.
_________________________
-Jeff Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.
|
Top
|
|
|
|
#347994 - 12/10/2011 15:30
Re: Someone explain .NET versions to me
[Re: JeffS]
|
addict
Registered: 24/07/2002
Posts: 618
Loc: South London
|
Do you guys using .NET commercially think about code security (IP issues) much?
I say this because, I've come across a few commercial applications (one of which costs a small fortune) which were written in .NET and I thought I'd take a look at them in more detail.
One had no obfuscation and .NET reflector lapped it up, for the most part I was looking at something which was pretty much readable source code.
The second was obfuscated and visually looking at the code didn't make much sense, but using the .NET reflector debugger I was able to poke about at its innards and gain a very good understanding of what it was doing.
Maybe the code obfuscator wasn't brilliant, but I found that it much more logical than say poking around compiled x86 code with a dissasembler or debugger.
It's been years since I shipped anything that was based on .NET (I did a couple of projects for customers in it) and I've always had this "security" flag waving in the back of my head.
|
Top
|
|
|
|
#347997 - 12/10/2011 15:43
Re: Someone explain .NET versions to me
[Re: sn00p]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Nowadays I typically write software for the end user, rather than shrink wrap software for sale generally. So it isn't really an issue for me.
I find it very useful to be able to dig into third party code when I'm having problems with it. I've also once recovered several months of work when a client lost the code I wrote for them (and unusually I hadn't kept a copy).
And I know if I need it there are some decent obfuscation tools out there (though it has been a few years since I evaluated any of them).
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347998 - 12/10/2011 15:45
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Most .NET obfuscation tools have a range of settings you can set, from mildly obfuscated to very obfuscated. Maybe what you were looking at was at the mild end.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#347999 - 12/10/2011 15:56
Re: Someone explain .NET versions to me
[Re: andy]
|
addict
Registered: 24/07/2002
Posts: 618
Loc: South London
|
Most likely!
I found it bizarre on the other piece of software that there wasn't even the token gesture of running the free obfuscator on it.
I think back to when I was implementing some code for software protection and I basically wrote a meta-assembler to generate obfuscated code from my source - each compile of the code would obviously generate a completely different set of code.
|
Top
|
|
|
|
#348000 - 12/10/2011 16:03
Re: Someone explain .NET versions to me
[Re: sn00p]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Early on with .NET obfuscation tools they could introduce subtle bugs, which is one reason why some people avoided them. The other main reason being that most .NET developers probably have no idea their "compiled" code is so readable
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#348001 - 12/10/2011 16:58
Re: Someone explain .NET versions to me
[Re: andy]
|
carpal tunnel
Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
|
I work on a banking app, so obviously security is HUGE for us. We only use an obfuscator on the encryption module which contains the code used for establishing connections to the server, including encryption, client certificates, and other fun stuff.
However, looking at the app code won't tell you much because it's fairly stupid. It just displays data and allows users to send requests back to the server. There is no database access and no business logic at all client side- this was very important to me and I pushed hard for this design from the get-go. Our architecure uses separate data-only objects between the client and server as well as inn the client so that none of the logic in our entities or back end processess is ever exposed through the client.
For example, if you looked at the code you'd see all of the fields listed that the user can input for "customer", but there's no logic at all for what it means to set a customer's password, how it is validated, and how it is encrypted to be stored in the database. We also validate all calls server side, whether they are validated on the client or not (though validation logic is exposed if it's used in both places). But someone couldn't figure out how to contect to our server directly and get bad requests through.
All of this had to pass an audit by a third party, which it did with flying colors- but we definitely developed with security in mind.
_________________________
-Jeff Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.
|
Top
|
|
|
|
#348004 - 12/10/2011 17:17
Re: Someone explain .NET versions to me
[Re: sn00p]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Um, wow. I opened Paint.NET with the trial of .NET Reflector, and you're right. It's pretty much just straight-up source code. Fascinating.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#348005 - 12/10/2011 17:21
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
carpal tunnel
Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
|
Who says MS dosen't support open source :p
_________________________
-Jeff Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.
|
Top
|
|
|
|
#348008 - 12/10/2011 17:27
Re: Someone explain .NET versions to me
[Re: wfaulk]
|
addict
Registered: 24/07/2002
Posts: 618
Loc: South London
|
Um, wow. I opened Paint.NET with the trial of .NET Reflector, and you're right. It's pretty much just straight-up source code. Fascinating. Scary huh? Now install the visual studio plugin and you can step through all that lovely code.... Andy is right, many developers don't understand just how "source readable" their binary application actually is, they seem like awfully scary developers to me.
|
Top
|
|
|
|
#348010 - 12/10/2011 17:42
Re: Someone explain .NET versions to me
[Re: sn00p]
|
carpal tunnel
Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
|
Well honestly, in most cases it doesn't matter how readable the compiled source code is. Unless you have some ultra important trade knowledge tucked away in your code, it just doesn't matter that someone can see how you did what you did.
And if you are writing code that IS sensitive, then you better make sure you hire developers who think about this stuff. Most probably don't because most probably don't need to.
Which is not to say that I disagree about scary developers. .Net (and Java- and other fancy languages for that matter) have definitely lowered the bar to getting compiled programs working, meaning just about anyone can write something the compiles and runs. Back in the day, if you didn't know what you were doing it was hard to get something running without some skill, much less making it do anything useful. Nowadays the tools are so powerful that it doesn't take much skill to get something running that does basically what you want- the skill comes with writing code that takes into account maintenence and an appropriate level of security- and on initial writing these items aren't valued as they should be. So any old (or young, really) developer will do, and people like me who make noise about it when people are writing crappy code are ignored in the name of getting it done, then stuck with figuring out how to miantain difficult code that has security risks.
But at least I'm not bitter.
_________________________
-Jeff Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.
|
Top
|
|
|
|
#348012 - 12/10/2011 17:57
Re: Someone explain .NET versions to me
[Re: JeffS]
|
addict
Registered: 24/07/2002
Posts: 618
Loc: South London
|
Well honestly, in most cases it doesn't matter how readable the compiled source code is. Unless you have some ultra important trade knowledge tucked away in your code, it just doesn't matter that someone can see how you did what you did. Yeah, but I guess its somewhat dependant on the sort of industry you're in. Consumer grade applications, meh, who really cares if I can see the "source" to how you format a report or some such triviality. However, in commercial scientific/engineering software you can guarantee that there's some sort of precious IP lurking in there, the kind of stuff that you probably wouldn't want to make it easy for your competitors to see. For example, the non-obfuscated software I mentioned running through .NET reflector generates "data", but it's the mathematical algorithms that do all the clever bits to generate this data, they're very non-trivial, I was staggered to find them sitting there staring at me. You're definitely right about the bar being dropped, I frequent a number of embedded forums and the number of requests you get from people asking trivial programming questions makes you worried that these people are actually trying to write embedded software, if you can't grasp the basics of software development I'd suggest that embedded development *really* isn't for you. It's warming to know that there are other developers (here!) our there that understand IP/security issues and have them in the forefront of their minds from the outset. FWIW I've also seen proprietary embedded devices which contain lots of IP have completely unencrypted firmware updates.
|
Top
|
|
|
|
#348045 - 13/10/2011 15:42
Re: Someone explain .NET versions to me
[Re: JeffS]
|
old hand
Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
|
Which is not to say that I disagree about scary developers. .Net (and Java- and other fancy languages for that matter) have definitely lowered the bar to getting compiled programs working, meaning just about anyone can write something the compiles and runs. Back in the day, if you didn't know what you were doing it was hard to get something running without some skill, much less making it do anything useful. Nowadays the tools are so powerful that it doesn't take much skill to get something running that does basically what you want- the skill comes with writing code that takes into account maintenence and an appropriate level of security- and on initial writing these items aren't valued as they should be. So any old (or young, really) developer will do, and people like me who make noise about it when people are writing crappy code are ignored in the name of getting it done, then stuck with figuring out how to miantain difficult code that has security risks.
But at least I'm not bitter.
I remember the old days. It was extremely easy to write code that could be vulnerable to buffer overruns, reference memory outside the program's address space and otherwise blow up the system. There will always be bad programmers and programmers will always be lazy. It's better to have languages that make it hard for the programmer to blow up the system than to rely on programmers to do the right thing all the time IMO.
|
Top
|
|
|
|
#348047 - 13/10/2011 16:13
Re: Someone explain .NET versions to me
[Re: siberia37]
|
carpal tunnel
Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
|
Oh yeah, don't get me wrong. I don't long for the old days and I LOVE the new tools. I just see the cost we pay for the new tools and wish we could come up with a barrier to entry that forces people to learn good coding practices.
_________________________
-Jeff Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.
|
Top
|
|
|
|
|
|