Migrating your code

Preface

With every release of the runtime libraries, designer and accompanying template sets new features are added and changes are made to fix bugs or design flaws. While we do everything we can to avoid breakage of your code, some changes are unavoidable. This section illustrates some important points to consider when you move your own code using the LLBLGen Pro generated code to the v3.0 templates and updated runtime libraries (version number: 3.0.0.0).

Before you proceed, please read the following important notice:

note Important:
Please make backup copies of your work before migrating to v3.0. That is: make backups of your own code and the generated code before using LLBLGen Pro v3.0. This way you can roll back to your original work and continue working with 2.6 or earlier versions if you decide that migration to v3.0 requires more work than you anticipated and you have to complete it at a later date.


note Important:
If you're generating new v3.0 code on top of a project generated with v2.6 or earlier, it can be that when you load the project(s) into VS.NET, the references to the runtime libraries are still pointing to the v2.6 runtime libraries or earlier versions. Please make sure you manually update these references to the v3.0 runtime libraries, and if applicable, add the reference to the LinqSupportClasses. See for more details about referencing the runtime libraries the section Compiling your code.


Furthermore, it's key to regenerate the code and also to check if you're indeed referencing the proper runtime libraries.

Below are the list of breaking changes in every 2.x version as well as the current version, v3.0. If you're migrating from 1.0.200x.y to v3.0, be sure you read all the breaking changes on this page. If you're migrating from v2.0 to v3.0, you need to check the breaking changes in v2.0, v2.5 and v2.6 sections. If you're migrating from v2.5, you've to check the v2.5 and v2.6 section. If you're migrating from v2.6, you only have to check the v3.0 section. If you run into a breaking change which isn't enlisted here, please let us know so we can add it here.

Migrating generated code from version v2.6 to v3.0 runtime libraries

The following changes are breaking changes introduced by v3.0. Please check them with your own project to make the transition as smoothly as possible.

Breaking changes v3.0

Templates
Runtime Libraries
 

Migrating generated code from version v2.5 to v2.6 runtime libraries

 A lot of the breaking changes are made on the .NET 2.0+ code only. This is due to the fact that the .NET 1.x codebase has reached its end of life (as well as the CF.NET 1.x code). LLBLGen Pro v2.6 does ship with .NET 1.x code support, but not a lot of the changes in v2.6 are made to that codebase as well. You're encouraged to upgrade to at least .NET 2.0.

Breaking changes v2.6

Runtime libraries
Templates, generated code.

Breaking changes v2.5

Runtime libraries
Templates

Migrating generated code from any previous version to 2.0.0.0 runtime libraries

You have to re-generate the code and recompile the generated code as well as to recompile your own code which references the runtime libraries of LLBLGen Pro (ORM Support Classes and / or DQE). Be sure you reference the new runtime libraries.

Your code will likely not compile at this point. Don't panic, we've created a list below with the important changes in the generated code / runtime libraries. The list is also important for code behavior changes at runtime as we made a small set of changes which could affect runtime behavior, as in: null reference exceptions because you access a property in your code which now returns null instead of a guaranteed value.

This guide assumes you're on 1.0.2005.1. If you're on an older version, you might run into one or two breaking changes depending on the current LLBLGen Pro version you're using, however in almost all cases these are compile time breakings, very rare and easy to fix. If you're using a lot of custom templates it might be you will run into more problems than which are listed below, which can be solved by updating your templates, which you have to do anyway due to the new template configuration system.

Breaking changes v2.0

General

Adapter specific

SelfServicing specific

Note: You can request the version of the runtime libraries you're currently using in your code using:

// C#
string version = SD.LLBLGen.Pro.ORMSupportClasses.RuntimeLibraryVersion.Version + "." + 
	SD.LLBLGen.Pro.ORMSupportClasses.RuntimeLibraryVersion.Build;
' VB.NET
Dim version As String = SD.LLBLGen.Pro.ORMSupportClasses.RuntimeLibraryVersion.Version & "." & _ 
	SD.LLBLGen.Pro.ORMSupportClasses.RuntimeLibraryVersion.Build

The runtime libraries have a file version attribute as well, besides the 2.6.0.0 version. You can request that version attribute's value by clicking with the right-mousebutton on the .dll and select 'Properties' and in the dialog that pops up, select the Version tab. The version format is: 2.6.08.mmdd.

LLBLGen Pro v3.0 documentation. ©2010 Solutions Design