CsProj output folder has changed in latest version

Posts   
 
    
tnero
User
Posts: 18
Joined: 09-Apr-2013
# Posted on: 30-Jun-2018 06:52:56   

Upgraded from 5.3 to 5.4

Now when I regen the location of the 2 .csproj's has changed.

It used to be in the Root (it gets deleted during gen) and now places in 2 locations:

.\DataBaseGeneric\xx.data.csproj .\DatabaseSpecific\xx.datadbspecific.csproj

This is causing some havoc.

was it intended?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 30-Jun-2018 09:43:23   

Yes, and it's documented in the 'migrating your code' section in the documentation. You should always read that when upgrading to a minor/major version. https://www.llblgen.com/Documentation/5.4/LLBLGen%20Pro%20RTF/migratingcode.htm#migrating-generated-code-from-v5.3-to-v5.4

It's a change we had to make due to how nuget works and we've postponed this change for as long as we could.

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 620
Joined: 25-Oct-2005
# Posted on: 09-Aug-2018 13:01:28   

I get a slightly different problem my DbSpecific projects are fine but my DbGeneric gets replaced each time by a fresh one.

TaskGroupElement 'Remove EntityFieldFactory class if it's no longer wanted (SD.Tasks.Base.FileRemover)' was skipped because its Perform Rule resolved to false.
Task: Remove DatabaseGeneric vs project file in old location (SD.Tasks.Base.FileRemover)
File 'C:\TFSProjects\RRSMS Development\Dev\AQD.Model\LLBLProject\.\..\AQD.Model.csproj' successfully removed.
Task: Remove RelationClasses folder (SD.Tasks.Base.DirectoryRemover)
Task: Remove Linq folder (SD.Tasks.Base.DirectoryRemover)
Directory 'C:\TFSProjects\RRSMS Development\Dev\AQD.Model\LLBLProject\.\..\Linq' removed succesfully.
Task: SD.Tasks.Adapter.DbGenericProjectDirectoryCreator
Directory 'C:\TFSProjects\RRSMS Development\Dev\AQD.Model\LLBLProject\.\..\' created/preserved successfully.
...
Task: SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator
Project file 'C:\TFSProjects\RRSMS Development\Dev\AQD.Model\LLBLProject\.\..\AQD.Model.csproj' has been newly created succesfully.

What gives?

Attachments
Filename File size Added on Approval
Generate.PNG 15,419 09-Aug-2018 14:25.31 Approved
Jeremy Thomas
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 09-Aug-2018 13:32:38   

Do you have some repro steps for me to try? E.g. what target folder specification, preset...

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 620
Joined: 25-Oct-2005
# Posted on: 09-Aug-2018 14:26:16   

I tried uploading my project file but it errored but I've attached a couple of screenshots to this post and the previous

Attachments
Filename File size Added on Approval
bindings.PNG 6,758 09-Aug-2018 14:27.20 Approved
Jeremy Thomas
Walaa avatar
Walaa
Support Team
Posts: 14982
Joined: 21-Aug-2005
# Posted on: 09-Aug-2018 20:43:22   

Uploading the llblgen project file should be fine. Try again to upload a repro one here, or upload the original one in a helpdesk thread for privacy.

Unless your adding entities or other class inside the project, the project file shouldn't be altered.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 10-Aug-2018 08:26:07   

and if multiple files are needed, zip them. I see you uploaded a dll, no idea what it does, is that a type converter dll ?

E.g. if it's the rootfolder specification with '..' it should be easy to reproduce, i.e. if you generate in a folder without using that, that's the root cause...

Template bindings, dlls etc. they're not important, the important bit is the preset file.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 10-Aug-2018 10:17:15   

I've tried to reproduce it by using target folder "...\" and that works fine, the project file is altered, not removed.


Task: SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator
Cleaned up project file.
Project file 'C:\Temp\generatortest\test1\Project\.\..\DatabaseGeneric\NW.csproj' has been altered succesfully.

(I see there's a typo in 'succesfully'... flushed )

So I'm not sure what's the actual cause of your problem...

can you reproduce it with a simple 1 entity project ? If so, that's a great repro, so attach that, if not, we can go from there. Thanks.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 10-Aug-2018 10:26:22   

I see you generate the project file in the old file location, is that enforced by a custom preset? The remover task simply checks for the file in the old location and removes it, and then your preset seems to regenerate it at the old location (i.e. in the parent folder of 'DatabaseGeneric') and it then will of course be removed the next time.

The new location of the project file is mandatory, i.e. inside DatabaseGeneric, as that is key for better nuget usage, otherwise you can't add the ormsupportclasses package to the databasespecific project if you already have added it to the Databasegeneric project.

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 620
Joined: 25-Oct-2005
# Posted on: 10-Aug-2018 10:30:33   

Otis wrote:

I see you generate the project file in the old file location, is that enforced by a custom preset?

No idea

Otis wrote:

The new location of the project file is mandatory, i.e. inside DatabaseGeneric, as that is key for better nuget usage, otherwise you can't add the ormsupportclasses package to the databasespecific project if you already have added it to the Databasegeneric project.

How do I make it go to DatabaseGeneric? that folder is not created...

I've attached the project file in a zip, yes that other dll is a typeconverter

Jeremy Thomas
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 10-Aug-2018 11:09:01   

TomDog wrote:

Otis wrote:

The new location of the project file is mandatory, i.e. inside DatabaseGeneric, as that is key for better nuget usage, otherwise you can't add the ormsupportclasses package to the databasespecific project if you already have added it to the Databasegeneric project.

How do I make it go to DatabaseGeneric? that folder is not created... I've attached the project file in a zip, yes that other dll is a typeconverter

If I copy the settings from your project into my test project I can reproduce it. It's caused by a setting. Project settings -> LLBLGen Pro Runtime Framework -> Adapter db generic sub folder name. It should be DatabaseGeneric.

The other setting, Adapter db specific sub folder name, should be DatabaseSpecific. It goes OK in your case as you have two db's.

Removing the names makes everything be dumped in 1 folder, that's not the way it should be. I know the setting 'should' work, but there are situations where this doesn't go well, so in general simply keep a folder name specified there. It can be improved tho: if the folder name is empty, it shouldn't remove the file, as there's nothing to move.

We'll make that adjustment to the task performer, and you should specify a folder for the setting so things are properly separated and you don't run into this problem (which is mainly caused by the fact your new project file is generated at the location of the old, faulty, one so the file remover removes it but it shouldn't do that. )

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 10-Aug-2018 11:57:25   

The 5.4.3 hotfix build we just released contains an updated preset which will run the removal tasks for the project files only if the settings are not empty. This should cover your setup if you want to keep the current folders.

Frans Bouma | Lead developer LLBLGen Pro
TomDog
User
Posts: 620
Joined: 25-Oct-2005
# Posted on: 10-Aug-2018 14:40:00   

Otis wrote:

The 5.4.3 hotfix build we just released contains an updated preset which will run the removal tasks for the project files only if the settings are not empty. This should cover your setup if you want to keep the current folders.

It does, thanks for sorting so quickly.smile Now I can get stuck into the new version.sunglasses

Jeremy Thomas