Migration from 1.x to 2.0

Posts   
 
    
spatches
User
Posts: 8
Joined: 20-Feb-2007
# Posted on: 20-Feb-2007 19:31:23   

I tried the migration of an existing project which was created using 1.x and things have gone quite badly. I would have expected that any code within this region...

region Custom User Code

...would have been preserved during the regeneration. However, it's all gone after regeneration.

Here are the settings I used:

Target platform: .Net 2.0 Template Group: SelfServicing Selected Preset: SD.Presets.SelfServicing.TwoClasses2005

Is there a hidden setting somewhere which will cause it to preserve the custom code?

Thanks in advance for any help you can provide.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 20-Feb-2007 20:41:17   

That's never been preserved. Only code between the user code markers: // __LLBLGENPRO_USER_CODE_REGION_START name // __LLBLGENPRO_USER_CODE_REGION_STOP

is preserved.

Frans Bouma | Lead developer LLBLGen Pro
spatches
User
Posts: 8
Joined: 20-Feb-2007
# Posted on: 20-Feb-2007 20:54:51   

At what version did LLBLGen start inserting those markers into the custom code region?

Is the name portion important?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 20-Feb-2007 21:23:12   

It was added in 1.0.2005.1 I think (but I have to look up the exact version, I don't recall it from memory).

The name is important, it has to match the template.

I'd suggest to generate code in a new empty folder, then check the entity code to see what the regions are called so you can add the markers.

But again, even in your current version, it will overwrite the code every time, unless you used an include template.

Frans Bouma | Lead developer LLBLGen Pro