Issues with upgrading a site from .net 2.0 to 3.5 - c#

I want to upgrade my company website from 2.0 to 3.5. I think it should be fairly painless as all the old methods are still supported (just depreciated) in newer versions of .net. Is that correct?

We had no issues at all upgrading all of our apps from 2.0 to 3.5
I doubt you'll have any issues because .NET 3.0 and 3.5 are "additive" releases - meaning the core functionality of .NET 2.0 remains the same, these just add features.
This brief article explains it a little more clearly: https://web.archive.org/web/20211020133927/https://www.4guysfromrolla.com/articles/112107-1.aspx
As a side note, we also had no problems going from 2.0 straight to 4.0. Microsoft has been doing a pretty good job of keeping the upgrades painless.
I would like to throw in a caveat - if you're using third party components, I can't vouch for how easily they survive the upgrade process, but given the additive nature of the releases through 3.5 I think you'll be fine.

Related

potential problems with c# with windows 7 due to .net versions

I have written an application that uses await async
works very nice
i have been asked to install it on a windows 7 machine and
i am afraid it won't work due to .net issues
if the .net is 3.5 what are the recommended ways of action?
There is no way to use async/await in .NET 3.5. You have a few options:
Convince them to let you install at least .NET 4.6. It really won't interfere with anything using .NET <= 3.5 right now.
Change your code to .NET 3.5 and just make it work (some features have Begin and End methods to achieve some sort of asynchronous operations, but not all)
Change your code to use .NET Core (and target .NET Core) so you can use all the newest stuff, without having to update the .NET Framework (you copy over only the .NET Core DLLs that you use into the application's folder). Read about self-contained deployments here.

Will .NET Framework 1.x apps run on PC's with .NET 4.0 only?

Basically, i am trying to determin if an application made for 1.x will run on a computer with just one copy of the .NET framework installed which is a higher version than what i am targetting, ie: it only has one copy of .NET 2.0, or 3.0, or 3.5 or 4.0 - has one copy of either of these and thats it, the hypothetical computer would not have 1.0 or 1.1 installed.
Trying to determine if 1.0 or 1.1 app would run here - the app is a simple app and im just trying to get the largest reach possible without the need to install the framework (and yes, i realize the frameworks are really small now days at about 40mb, but this is still not an option for me). thanks
an aside: btw, i have googled this to no avail, do we have or does anyone know adoption stats in terms of % of windows computers that run (say) 2.0, 1.x, 3.5 etc... or 2.0 and above, or 1.x and above? there is a reference on scott hanselmans blog but this seems really optimistic and incorrect to me as i did some user-string analysis of common users, and adoption of 2.0+ was barely above 50% while hanselmen said according to windows update data it was 95% (and this was in janruary 2010).
Edit\Update Could someone please confirm if Nayan's answer (and Daniels point under Darins answer) is correct? If so, this would change everything!
Yes it will run fine if you have a higher version of the framework installed. It is backwards compatible. But in the end of 2010 there's very little sense in still keeping applications targeting .NET 1.*. You could at least recompile them to target the .NET 2.0 if not .NET 3.5 or 4.0.
To answer your aside the wikipedia page shows what versions of windows have what version of .net pre-installed by default
To answer your main question. I know 100% that if you have 3.5 it will run 1.0-3.5 with just that installed. However I do not know if that is true for 4.
You should not have any problems running your application on .net 1+ frmaeworks.
. Net has been designed to always be backwards compatible. This means if we get to later versions it will still work.
It also means if the Microsoft team make a mistake it will still be there just a better way will be available
I don't think the question is very clear. I'll explain:
If you are asking if the application is already built on .NET 1.x and you are trying to run it in any other version, it will not work. It would need the same version.
But if you still have the code and are willing to recompile it on newer .NET versions, then you will have a newer .NET version compatible app!
What, I feel, missing in your question is that whether you are talking about built up apps or source codes.

CastleProject Monorail 2.0 compatible with .NET 2.0?

I just saw castleproject.org has released the 2.0 version of monorail in January 2010 (we are still using the 1.0RC3).
Is this version (still) compatible with .NET 2.0 (or Visual Studio 2005), and if it does will I face any problems upgrading a current web application from 1.0RC3 to 2.0?
Source code changes to monorail 2.0 and / or contributions, is that still .NET 2.0 compatible? (The trunk version was .NET 3.0 a while ago I think). Can someone please enlighten me?
Assuming you'd have .NET 3.5 runtime installed, you could write .NET 2.0 applications and reference MonoRail 2.0
I also think that having the latest service packs for .net 2.0 installed should be enough.
I'm not sure though.
I would, however, recommend that you move to VS2008, as VS2005 is simply old.
As for the actual changed in your app from 1.0RC3 to 2.0 - it depends on the level of usage you had. The more extension points you hooked into, the more adjustments you'd need. It really depends on your specific case. However, from my experience upgrading more than a few applications from MR 1 to MR 2, including very complex ones with deep integrations onto Monorail's core, the longest and toughest took two work days. I'd suggest you will consult with monorail's usergroup, and optionally get a consultant experienced with MR for a day or two.

Differences between .NET versions (predominantly c#)

Ive recently been asked to recommend a .NET framework version to use in a (GUI based) project for an XP machine.
Can anyone explain the differences between all the .NET versions?
OR,
Does anyone have a good reference to a site that details (briefly) the differences?
Jon Skeet's book C# In Depth has one section describing versions of .NET in details.
The only reason to not go for the latest version is that it can complicate deployment.
.NET 2.0 is installed automatically via Windows Update, so you can expect it to be on the target computer when your deploy your application. .NET 3.5 is not being pushed automatically yet, so you need to distribute the framework with your application. This will probably change in the near future.
If you are not concerned about deployment, then go for the latest version. The fact that you target the .NET 3.5 framework, does not mean that you have to use all the new technology. For instance you can still use Windows Forms instead of WPF, but that is another question.
The short answer is that it depends.
.NET 2.0 is the oldest version you should be considering.
.NET 3.0 is an easy upgrade path from 2.0, not the same amount of breaking changes as from 1.1 to 2.0. However it is more of an extension, horizontally of functionality, and you would not see a huge shift in graphical options.
.NET 3.5 should be looked at if you are interested in much more sophisticated gui such as sliverlight. It has a lot more new technologies and options to offer including WPF, a new IDE in Expression and much more. http://www.asp.net would not be a bad start.
This page is good for a list of changes:
http://en.wikipedia.org/wiki/Microsoft_.NET
As someone has already mentioned, .NET 2.0 is the minimum version you need to look at. Things like Generics make it a must have.
.NET 3.5 is the other version you should consider. It depends on how you want to design your projects, .NET 2.0 is very developer central, whereas .net 3.5 has a good split between designer and developer.
It doesn't really matter much. .NET 2.0, 3.0 and 3.5 all use the exact same CLR and base classes. Each version just adds a set of new assemblies. For GUI development, you're fine with 2.0 if you use Windows Forms, you'll need 3.0 for WPF. Since they are otherwise essentially identical, there is no good reason to not just install 3.5 SP1.

.NET 2.0 or 3.5?

Our clients use a vb6 version of our software.
We are upgrading them to a .NET application written in C#...
Is there less bulk using .net 2.0 than .net 3.5?
My definition of less bulk would be: Smaller size, smaller installation time, etc.
Most of them probably already have 2.0 anyway.
I only ask because I would like to take advantage of LINQ in 3.5.
For taking advantage of LINQ, you need 3.5 (unless you want to use LINQBridge with 2.0).
For a smaller installer, .Net 3.5 Sp1 has a new feature called "Client Profile".
The .NET Framework Client Profile setup contains just those assemblies and files in the .NET Framework that are typically used for client application scenarios. For example: it includes Windows Forms, WPF, and WCF. It does not include ASP.NET and those libraries and components used primarily for server scenarios. We expect this setup package to be about 26MB in size, and it can be downloaded and installed much quicker than the full .NET Framework setup package.
Is not installing .NET 3.5 just to save a few Mb really that much more important that gaining a huge increase in productivity with LINQ and other .NET 3.5 features?
Why start off behind in technology?
The .Net 3.5 runtime is ~50Mb. The 2.0 runtime is ~23Mb.
But if you control the deployment or installation, that really shouldn't be an issue. This is especially true for 'clients' vs 'customers', and the word client involves and on-going, personal relationship. If it comes to it, send them a CD. Then anything under 700Mb is all the same.
Check out LINQBridge:
http://www.albahari.com/nutshell/linqbridge.aspx
Adding LINQ support to .net 2 (.net 3.5 still uses CLR 2.0).
.NET 3.5 is .NET 2.0 + more libraries and extensions, so yes, the install is bigger. In my opinion however, it is very much worth the extra bulk because of the extra stuff it gives you.
If it's a VB6 app, you should check which Windows versions the app is currently used on, and select the .Net version accordingly. AFAIK 3.5 does not run on W2K.
If you would like to take advantage of LINQ, then go for 3.5! I find there's not more 'bulk' when using it myself, but unless you want to use LINQ, then either is fine.
Keep in mind that certain OSes (Windows 2000 Server) won't let you install .NET 3.0 or 3.5, so you may have to stick with 2.0 for that reason.
I would suggest that you go straight with visual studio 2008 and .net 3.5 sp1,
2.0 is the basis of 3.5 and you can easily start using 2.0 and then start to use 3.5 functionalities.
Furthermore 3.5 SP1 also brings tweaks to the 2.0 framework which are nice to have.
I suggest you to go directly to 3.5 because you will be less far away (in the future ... in 3-5 years) to change to other version of framework. If in 5 year .Net is at version 5, the jump will be smaller to do. So, VB6 to 3.5 is what I suggest you.
The size of the framework is not very high, less than 60 megs... not a big deal now I think.
Also note, depending were you install the .NET framework it might be irrelevant how much extra bulk there is. The .NET Framework installs are relatively small in modern terms.
As for LINQ, it will save you a lot of time and effort, and offers a quick way to get at data. However it also depends on the clients the application will be distributed out to.
I'd say at that, go with 3.5 unless there is another major roadblock on the clients for whatever reason.
As others have pointed out, the .NET 3.5 install is longer and larger than .NET 2.0. Keep in mind that .NET 3.0 and .NET 3.5 are both extensions on top of the .NET 2.0 CLR.
I would still say upgrade from VB6 directly to .NET 3.5 (actually .NET 3.5 SP1) and VS2008, as long as your client operating systems support that version of the Framework (otherwise you will need to choose the lowest common Framework version, which very well may be .NET 2.0). You will save yourself a lot of time/effort in the long run.

Categories

Resources