Gen'd Project files

Posts   
 
    
Posts: 27
Joined: 22-Feb-2012
# Posted on: 28-Feb-2012 02:38:11   

Hello,

For the life of me I can't figure out how to get the C# project file to be included in the project folder like it would be if you created a new project in VS2010 .

Thank you. Stephen

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Feb-2012 04:03:59   

Hi Stephen,

Follow these steps:

  • 1. Press F7 (generate code)
  • 2. Go to Tasks to execute tab
  • 3. Expand the SD.Tasks.Adapter.DatabaseGeneric task group
  • 4. Locate and select the SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator task
  • 5. Select the Tasks Performer Parameters sub-tab
  • 6. Locate and select the destinationFolder parameter and set it to [dbgenericSubFolder]
  • 7. At this point you modified the default preset. You can save it (Save button) or save it as a new preset (Save As... button)
  • 8. Do steps (3-7) for the SD.Tasks.Adapter.DatabaseSpecific group / SD.Tasks.Adapter.VsNetDbSpecificProjectFileCreator task. The difference is: For step 5, set it to [dbspecificSubFolder]

I saw you are using Adapter template set, that's why those are the steps. It's similar for SelfServicing though.

What is a preset? It's a file that store the tasks you want to execute and the real parameters to use for those tasks. Read the SDK docs for more info.

David Elizondo | LLBLGen Support Team
Posts: 27
Joined: 22-Feb-2012
# Posted on: 28-Feb-2012 19:45:03   

Thank you.

When I go to save my changes I get this exception. I am an admin on the windows 7 box and started the project with the clr 4.0 bootstrapper.

If I run the bootstrapper as an admin everything work fine and I can save the preset..

Exception information.

LLBLGen Pro version: v3.1. Build: September 30th, 2011

Exception details:

Message: Access to the path 'C:\Program Files (x86)\Solutions Design\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\Tasks\SD.Presets.Adapter.General2010.preset' is denied. Source: mscorlib Stack trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.Preset.Save(String filename, EncodingType encodingToUse) at SD.LLBLGen.Pro.Gui.Forms.CodeGenerationConfigurator.SaveCurrentRunQueueAsPreset(Boolean performSaveAs) at SD.LLBLGen.Pro.Gui.Forms.CodeGenerationConfigurator._savePresetButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner exception: <null>

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Feb-2012 06:10:28   

stephenpatten wrote:

When I go to save my changes I get this exception. I am an admin on the windows 7 box and started the project with the clr 4.0 bootstrapper.

That is expected, as you don't have admin permission on c:\program files.

stephenpatten wrote:

If I run the bootstrapper as an admin everything work fine and I can save the preset..

Yep. You also could 'save as' in some AdditionalTasks folder in your personal documents.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 29-Feb-2012 11:22:03   

(so set the 'AdditionalTasksFolder' in project settings/properties to a folder in your own documents folder and save into that folder)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 27
Joined: 22-Feb-2012
# Posted on: 28-Mar-2012 00:09:14   

daelmo wrote:

Hi Stephen,

Follow these steps:

  • 1. Press F7 (generate code)
  • 2. Go to Tasks to execute tab
  • 3. Expand the SD.Tasks.Adapter.DatabaseGeneric task group
  • 4. Locate and select the SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator task
  • 5. Select the Tasks Performer Parameters sub-tab
  • 6. Locate and select the destinationFolder parameter and set it to [dbgenericSubFolder]
  • 7. At this point you modified the default preset. You can save it (Save button) or save it as a new preset (Save As... button)
  • 8. Do steps (3-7) for the SD.Tasks.Adapter.DatabaseSpecific group / SD.Tasks.Adapter.VsNetDbSpecificProjectFileCreator task. The difference is: For step 5, set it to [dbspecificSubFolder]

I saw you are using Adapter template set, that's why those are the steps. It's similar for SelfServicing though.

What is a preset? It's a file that store the tasks you want to execute and the real parameters to use for those tasks. Read the SDK docs for more info.

FYI, with v3.5 if you change these tasks as described above the build directory becomes rather convoluted and is buried underneath this new folder name. e.g com.fooCompany.DomainModel.csproj and the build Output path is now com.fooCompany.DomainModel\bin\debug\

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Mar-2012 07:39:53   

stephenpatten wrote:

FYI, with v3.5 if you change these tasks as described above the build directory becomes rather convoluted and is buried underneath this new folder name. e.g com.fooCompany.DomainModel.csproj and the build Output path is now com.fooCompany.DomainModel\bin\debug\

Yes, and that is because the binRootFolder parameter of that task is set to [dbgenericSubFolder]. So as your destinationFolder parameter is set to [dbgenericSubFolder], the bin folder becomes [dbgenericSubFolder][dbgenericSubFolder].

So I think a new 6.1. step is needed:

  • 6.1. Locate and select the **binRootFolder **parameter and set it to empty (that means, just delete it's value.
David Elizondo | LLBLGen Support Team
Posts: 27
Joined: 22-Feb-2012
# Posted on: 30-Mar-2012 22:14:31   

daelmo wrote:

stephenpatten wrote:

FYI, with v3.5 if you change these tasks as described above the build directory becomes rather convoluted and is buried underneath this new folder name. e.g com.fooCompany.DomainModel.csproj and the build Output path is now com.fooCompany.DomainModel\bin\debug\

Yes, and that is because the binRootFolder parameter of that task is set to [dbgenericSubFolder]. So as your destinationFolder parameter is set to [dbgenericSubFolder], the bin folder becomes [dbgenericSubFolder][dbgenericSubFolder].

So I think a the 6.1. step is needed:

  • 6.1. Locate and select the **binRootFolder **parameter and set it to empty (that means, just delete it's value.

That was it, Thank you.