<p>I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework.</p>

<p>The project consist for the bigger part of VB.NET, but there are also parts in C#. It is a Windows Forms application, using various third party controls. Using .NET remoting the rich client talks to a server process which interfaces with a MSSQL 2000 database.</p>

<p>What kind of issues can we expect in case we decide to perform the upgrade?</p>

[{'answer_id': 57454, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>Nothing, really.  You'll find a couple warnings on compilation about obsolete methods, but often those are trivial to fix.</p>\n\n<p>You should shoot big and go for 3.5.  The water is niiiiiiice in here.  </p>\n"}, {'answer_id': 57468, 'author': 'swilliams', 'author_id': 736, 'author_profile': 'https://Stackoverflow.com/users/736', 'pm_score': 0, 'selected': False, 'text': "<p>You probably won't have any <strong>breaking</strong> issues, though you may get some deprecated method warnings. The compiler should generally tell you what the replacement is though. I know that some of the System.Configuration things were updated.</p>\n"}, {'answer_id': 57469, 'author': 'Chris Wenham', 'author_id': 5548, 'author_profile': 'https://Stackoverflow.com/users/5548', 'pm_score': 1, 'selected': False, 'text': '<p>The most compilation warnings you\'ll see are if you use app.config to store program settings. The 1.1 configuration class was deprecated for System.Configuration.ConfigurationManager.</p>\n\n<p>Other warnings you may see coming from the compiler will be for uninitialized variables (set them to "= nothing" or "= null;" in the variable declaration to make them go away), and unused variables (the compiler is sure they\'re safe to delete).</p>\n'}, {'answer_id': 57474, 'author': 'Anthony Mastrean', 'author_id': 3619, 'author_profile': 'https://Stackoverflow.com/users/3619', 'pm_score': 2, 'selected': False, 'text': '<p>Take a peek at this <a href="http://www.ythos.net/casestudy.aspx?CaseStudyId=12" rel="nofollow noreferrer">whitepaper</a> on evolving a .NET 2.0 application to 3.5. I hold that the changes from 1.1 to 2.0 are more significant, but the process should be similar.</p>\n'}, {'answer_id': 57478, 'author': 'Mendelt', 'author_id': 3320, 'author_profile': 'https://Stackoverflow.com/users/3320', 'pm_score': 1, 'selected': False, 'text': "<p>Most of the code should still compile except for a few warnings about stuff being obsolete.</p>\n\n<p>But there are a couple of things you should look out for with respect to Visual Studio generated code.</p>\n\n<p>If you've generated strongly typed datasets in Visual Studio 2003 you can forget about editing them in newer versions of visual studio. You'll have to rebuild them or better just replace them with something like nHibernate for ultimate OR-mapper-bliss</p>\n\n<p>The designer for forms should still work with old forms. You can get some confusion though because 2005 and 2008 use partial classes here. So if you create new forms the code looks different from the old ones.\nI have never upgraded an ASP.Net application so I don't know about web-forms but I guess it will work the same as winforms stuff. Mostly it will work but expect some designer weirdness.</p>\n"}, {'answer_id': 57487, 'author': 'Mark', 'author_id': 5904, 'author_profile': 'https://Stackoverflow.com/users/5904', 'pm_score': 3, 'selected': False, 'text': '<p>We\'re looking at doing the same migration right now Tobi.  First, you can get a good idea of what to expect by making a copy of your project (or a portion of it) and give it a "dry run" through the .NET 2.0 compiler.  My experience with this was that the 2.0 compiler gives more warnings about bad programming practices that the 1.1 compiler let slide.  The compiler will warn you about implicit casts, "ambiguous" return paths (a code path where a function doesn\'t return a value), and some other minor things.</p>\n\n<p>Here\'s a few links that you might find helpful:\n<a href="http://msdn.microsoft.com/en-us/library/ms994381.aspx" rel="noreferrer">.NET Framework Compatability</a></p>\n\n<p><a href="http://go.microsoft.com/fwlink/?linkid=51223" rel="noreferrer">Word Document of Breaking changes in .NET Framework 2.0</a></p>\n'}, {'answer_id': 57496, 'author': 'Kevin Kershaw', 'author_id': 4292, 'author_profile': 'https://Stackoverflow.com/users/4292', 'pm_score': 2, 'selected': False, 'text': '<p>In addition to the app configuration stuff mentioned above, if you use any XSD validation you will need to replace some code around loading and validating XML.</p>\n'}, {'answer_id': 57501, 'author': 'Tobi', 'author_id': 5422, 'author_profile': 'https://Stackoverflow.com/users/5422', 'pm_score': 1, 'selected': False, 'text': "<p>.NET 1.1 and .NET 2.0-3.5 are entirely different frameworks, and more importantly, .NET 3.5 is just a set of extra assemblies you can add to your .NET 2.0 project - none of the core assemblies actually got changed, as far as I'm aware - and an upgraded compiler that knows about the syntax sugar called LINQ, extension methods, etc.</p>\n\n<p>In other words, I do not think a .NET 2.0-3.5 upgrade is very similar to a .NET 1.1-2.0 upgrade.</p>\n"}, {'answer_id': 62134, 'author': 'MikeeMike', 'author_id': 6447, 'author_profile': 'https://Stackoverflow.com/users/6447', 'pm_score': 3, 'selected': False, 'text': '<p>There is a change to the theading model in .Net 2.0 onwards where unhandled exceptions in a thread will cause the whole app to terminate. I ran into this when updating an app that did lots of threading and occasionally crashed. Obviously the .Net 2.0 model is more robust as you should certainly be catching these anyway, but it was the only really issue I came across when making the migration.</p>\n\n<p>This article talks all about it:\n<a href="http://odetocode.com/blogs/scott/archive/2005/12/14/2618.aspx" rel="noreferrer">http://odetocode.com/blogs/scott/archive/2005/12/14/2618.aspx</a></p>\n'}, {'answer_id': 62202, 'author': 'Russ', 'author_id': 6496, 'author_profile': 'https://Stackoverflow.com/users/6496', 'pm_score': 1, 'selected': False, 'text': '<p>Things will probably compile OK, but we had a few nasty runtime issues with an application we upgraded at the start of the year. </p>\n\n<p>First, we had a number of problems with timezone handling in DateTime objects when calling 1.1 webservices from a 2.0 application, as the conversions to and from UTC when serializing to the wire appeared to work differently between framework versions.</p>\n\n<p>Also, 2.0 async webservices use the klutzy event-based mechanism instead of the IAsyncResult pattern, which is a royal pain if you are batching your requests.</p>\n\n<p>Finally, we had some legacy code that hosted an embedded browser using Microsoft.mshtml.dll. Upgrading to 2.0 caused the application to silently switch to a newer version of that dll, which had some changed behaviour related to javascript interaction. This last one is a bit of an obscure case, but shows that moving to the newer runtime may have implications for any COM interaction you might have.</p>\n\n<p>Hope this helps!</p>\n'}, {'answer_id': 74534, 'author': 'CindyH', 'author_id': 12897, 'author_profile': 'https://Stackoverflow.com/users/12897', 'pm_score': 1, 'selected': False, 'text': '<p>The way we were doing email had to change.  The 1.1 version used system.WEB.mail, with</p>\n\n<pre><code>    Imports System.Web.Mail\n    \'\n    Dim message As New MailMessage\' this is a web.mail msg, not a net.mail msg\n    Dim objConn As SmtpMail\n    Dim objAttach As MailAttachment\n        \'\n    message .From = "From@us.com"\n       \' more properties assigned to objMail\n    objAttach = New MailAttachment(ExportName)\n    message.Attachments.Add(objAttach)\n       \' Here\'s where we actually send the thing\n    SmtpMail.SmtpServer.Insert(0, "127.0.0.1")\n    objConn.Send(objMail)\n</code></pre>\n\n<p>and the new one has system.NET.mail</p>\n\n<pre><code>         Imports System.Net.Mail\n        \'\n         Dim message as MailMessage \' this is a net.mail msg, not a web.mail msg\n         Dim data As Attachment\n        Dim client As New SmtpClient("127.0.0.1")\n    \'\n        data = New Attachment(ExportName)\n    \' Create the message and add the attachment\n        message = New MailMessage(EmailFrom, EmailTo, reportDescription)\n        message.Attachments.Add(data)\n\' Send the message\n        client.Send(message)\n</code></pre>\n'}, {'answer_id': 171688, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<h1>RESX files upgrade problems</h1>\n\n<p>Watch out for internationalized RESX files.  </p>\n\n<p>When you reopen a ,net 1.1 form in .net 2.0 the RESX file gets upgraded to a new version.  In .net 1.1 the foreign language .resx file only contained the changes.  In .net 2.0 ALL of the fields in the default .resx file now get moved into the foreign language resx file. (.fr.resx for example).  If you have already internationalized the form all of the foreign language resx files will have to be looked at.</p>\n\n<h1>Internationalisation Tools</h1>\n\n<p>Some tools that you may have used/written yourself to do internationalization en mass may not work anymore as they may have used numbered resources.  (Multi Lang &amp; Infragistics)</p>\n\n<p>Infragistics Winforms controls modify the InitializeForm() in .net 1.1 and access resources using a resource numbering system.  When migrated to .net 2.0 the numbering of the Infragistics resources will fail as the resx file is regenerated. You will need to upgrade your Infragistics libraries.</p>\n'}, {'answer_id': 4594871, 'author': 'winwaed', 'author_id': 481927, 'author_profile': 'https://Stackoverflow.com/users/481927', 'pm_score': 0, 'selected': False, 'text': "<p>There shouldn't be too much of a problem as in theory it is backward compatible (I note MikeeMike's comment about thread exceptions). After the move, you'll fine there are quite a few nice things like generics. Although you don't want to port all your collections to generics in one fell swoop, once  you've done this your code should be more reliable due to the reduced number of casts - and probably quicker (although mileage may vary in this aspect). At the moment I'm about to start the .NET 2 -> .NET 4 conversion of three of my products. The main advantage will be the further improvements in multi-threaded support (parallel foreach loops, etc).</p>\n"}]
['https://Stackoverflow.com/questions/57449', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5422/']