Source control strategies for sharing LLBLGen generated code

Posts   
 
    
jovball
User
Posts: 441
Joined: 23-Jan-2005
# Posted on: 29-Mar-2023 03:34:49   

I have been using LLBLGen for many years but until now each LLBLGen project has always been part of a single VS solution. I am in a situation now where (ideally) the project or generated code would be used by several different developer teams working on multiple solutions/applications. I am looking for suggestions on the best way to handle this with source control, git in my case.

Here are options I have considered so far.

  • Create a separate repository solution with the LLBLGen project file and the generated code. Create Nuget packages with the generated code. This has some friction in terms of updating the packages on the developer PC and then pushing the nuget packages to the nuget server whenever the application gets pushed to the repo and picked up by the build server.

  • Reference the generated code dlls in a lib folder and include them in the git repo. This would probably involve Git LFS.

  • Use subtrees or submodules. This seems even more complicated in terms of keeping things in sync between the LLBLGen repo and the application repos.

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 29-Mar-2023 19:08:21   

For me nuget seems the best option.

But in general here are my 2 cents.

1- If the LLBLGen generated code is only maintained by one team, and all the rest are just consumers, then a dedicated repo for it only accessible to the team in charge, and the consumers should use nuget to access the appropriate version.

2- Otherwise the build script of the consuming projects can reference a dependency on a folder where the DAL artifact is published.

3- If all the applications are in the same repo (using different branches), then another branch for the DAL would be good enough.

P.S. I don't recommend having any dlls or builds in the source control.