VSS and LLBLGen best practices

Posts   
 
    
moebius
User
Posts: 8
Joined: 01-Jul-2005
# Posted on: 19-Jul-2005 17:24:15   

The generated sources are checked in into our Visual Source Safe. As the db-schema is evolving we have to regenerate the llblgen classes. I wonder what are the best steps to get all the classes into vss with as little pain as possible. If an already existing entity is changed all is easy, I checkout all the stuff of the generated llblgen project, checkout the lgb-file, get the changed schema and generate the sources, without a project file.

But when a new entity is added or an existing one is deleted this procedure will fail, as the new generated files does not exist in the project file. Only way is to add them manually. Error prone and boring task.

Easy way seems to just regenerate the whole sources not just the changes and the project file. Thats what I am currently do, checkout the the whole project, close vs.net, delete the project files from disk manually regenerate the sources and open vs.net again. Vs.net notices that the project was on vss before and offers to rebind it.

Other ways or hints?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 11:52:19   

New generated files are added to the project file by LLBLGen Pro, though you have to check it out first, as it is readonly if it's not checked out. NEVER remove the project file. you could remove all other files, but not the project file, as you'll get problems later on because a new projectfile has a new guid. So leave it and check it out first.

So that's key. So before you generate new code, check out the complete generated source. Then, new files aren't added to vss automatically. You can do that with the vss client, by checking in the generated sourcefolder after generating new code by simply right-clicking the project in the vss client and select 'check in...'. As we don't use vss anymore for a long time, I'm not sure if 'check in..' adds new files to the project in vss, or that you have to do that manually. Does that require a manual action?

Frans Bouma | Lead developer LLBLGen Pro
moebius
User
Posts: 8
Joined: 01-Jul-2005
# Posted on: 21-Jul-2005 09:50:26   

Good to hear that that the project file is not overwritten! Just was under the impression it would. So it should be a lost easier now!

Out of curiosity, what SCM are you using?

wvnoort
User
Posts: 96
Joined: 06-Jan-2005
# Posted on: 21-Jul-2005 10:24:55   

Otis wrote:

As we don't use vss anymore for a long time, I'm not sure if 'check in..' adds new files to the project in vss, or that you have to do that manually. Does that require a manual action?

Well, if you do it from Visual Studio, checking in at the solution or projectlevel, will add the new files to VSS. In my experience it only neccessary to do things manually if you remove entities from the LLBLGen project. You have to remove that entity manually from the Visual Studio project, and VSS.

Talking about VSS and LLBLGen, is there a best practice for placing the templates, and config files and LLBLGen project in VSS?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Jul-2005 10:25:10   

moebius wrote:

Good to hear that that the project file is not overwritten! Just was under the impression it would. So it should be a lost easier now!

simple_smile

Out of curiosity, what SCM are you using?

Subversion. I moved away from VSS 1.5 years ago and it's a breeze since then. The main gripe I had with vss was that it locked files on the disk and I didn't have a way to reach the sourcecontrol system with scripts or a very simple program.

Together with the tortoisesvn client, it works very well.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Jul-2005 11:17:21   

wvnoort wrote:

Otis wrote:

As we don't use vss anymore for a long time, I'm not sure if 'check in..' adds new files to the project in vss, or that you have to do that manually. Does that require a manual action?

Talking about VSS and LLBLGen, is there a best practice for placing the templates, and config files and LLBLGen project in VSS?

VSS doesn't version binary files, so storing the .lgp file in VSS is always making a direct copy. That can work very well though, just something to keep in mind with large .lgp files.

As for templates: you can for example store them in a separate tree and then create new projects inside VSS and use the sharing feature, which thus makes the files in those new projects be symbolic links to the real files. This can be handy if you want to share templates among different template sets.

Frans Bouma | Lead developer LLBLGen Pro