InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

The Complete List of Migration Issues Upgrading to .NET 4.0

Posted by Abel Avram on Apr 29, 2010

Sections
Development,
Architecture & Design
Topics
Programming ,
.NET
Tags
.NET Framework 4.0 ,
migration

Microsoft has published a complete list of issues migrating from .NET Framework 3.5 SP1 to .NET 4.0. The list contains changes in 6 domains: Core, ASP.NET, ADO.NET, WCF, WPF, and XML.

.NET applications compiled for .NET 3.5 run without any problem if .NET Framework 4.0 is installed on the same machine because the two frameworks are installed in parallel and do not interfere with each other. But there are problems if an application is recompiled for .NET 4.0 because Microsoft’s latest runtime introduces some breaking changes but also some enhancements.

The changes appear in the following 6 domains:

The list of changes is relatively long, so we won’t cover them here. Some of them are:

Core

Application configuration file name change “If your application configuration file is named application-name.config, rename it to application-name.exe.config. For example, renameMyApp.config toMyApp.exe.config.”
Code Access Policy has been turned off. See Code Access Security Policy Compatibility and Migration.

ASP.NET

Apps running trusted code in the global cache might fail due to CAS policy change. See Code Access Security in ASP.NET 4 Applications.
ASP.NET 2.0 apps installed on IIS 6.0 may generate errors after ASP.NET 4.0 is installed. Either disable ASP.NET 4.0 or move ASP.NET 2 apps to an IIS instance that does not have ASP.NET 4 installed.
The Page Parser in ASP.NET 4.0 is stricter. Errors generated by invalid markup should be fixed.

Data

Streams “WCF Data Services no longer closes the underlying stream for read and write operations.”
Events “A System.Data.Linq.EntitySet(Of TEntity) collection now raises the ListChanged event for add and remove operations if the EntitySet(Of TEntity) is unloaded, in addition to raising the event when the collection is loaded.”
Queries “Skip(0) is no longer ignored in LINQ to SQL queries. As a result, queries that have this method might behave differently. For example, in some cases, an OrderBy clause is required with Skip(0) and the query will now throw a NotSupportedException exception if the OrderBy clause was not included.”

WCF

Configuration files WCF support merging across config files.
Service hosting “You can no longer specify the <serviceHostingEnvironment> configuration element at the service level by adding the attribute allowDefinition="MachineToApplication" to the element definition.

Specifying the <serviceHostingEnvironment> element at the service level is technically incorrect and causes inconsistent behavior.”

WPF

Exception handling “To enable errors to be detected earlier, WPF throws a TargetInvocationException and sets the InnerException property to critical exceptions, such as NullReferenceException, OutOfMemoryException, StackOverflowException, and SecurityException, instead of catching the original exception.”
Windows style “An InvalidOperationException is thrown if you try to set WindowStyle to a value other thanNone when AllowsTransparency is true andWindowState is Minimized.”
Dialog boxes “To improve reliability, the CommonDialog.ShowDialogmethod is called on the same thread that created theMicrosoft.Win32.FileDialog control.”

XML

Namespace resolvers “The XmlReader.ReadContentAs method no longer ignores the IXmlNamespaceResolver resolver passed to it.”
Whitespace “To prevent data loss when you are creating a reader, the XmlReader.Create method no longer discards significant white space.”

No comments

Watch Thread Reply

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.