Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Custom Templates> ProjectFileCreator with VS2008 projects
 

Pages: 1
Custom Templates
ProjectFileCreator with VS2008 projects
Page:1/1 

  Print all messages in this thread  
Poster Message
GizmoTN76
User



Location:

Joined on:
22-Oct-2007 18:47:51
Posted:
33 posts
# Posted on: 26-Oct-2007 23:38:12.  
I've got 2 questions I was hoping someone could help me out with:

1. I know you guys aren't officially supporting VS2008 yet, but is there any way short of writing a custom task performer to get llblgen to produce VS2008 project files? Every time I regen the projects it has to go through the project conversion wizard which is becoming a pain in the tail. If a custom task performer is the only solution is there any chance that someone else has already written one for this purpose?

2. I'm trying to use the ProjectFileCreator task to create a custom project for the manager templates, and it work, sorta, however it seems to be defaulting the obj and the property folders to the parent folder where the project file is getting created. This doesn't appear to happen with the default projects llblgen creates so I'm guessing I'm doing something wrong in the call to the task. Here's the task config I've got (this is for llblgen 2.5 btw)

Code:
    <task name="ManagerProjectCreator" assemblyFilename="SD.LLBLGen.Pro.TaskPerformers.dll"
            taskPerformerClass="SD.LLBLGen.Pro.TaskPerformers.ProjectFileCreator"
            description="Generates the VS.NET project file for the manager project. Be sure to place this at the end of the taskgroup." isOptional="false">
            <supportedPlatforms>
                <platform name=".NET 2.0"/>
                <platform name=".NET 3.0" />
            </supportedPlatforms>
            <supportedTemplateGroups>
                <templateGroup name="Adapter"/>
            </supportedTemplateGroups>
            <dependencies/>
            <parameters>
                <parameter name="destinationFolder" defaultValue="" isOptional ="false" description="The folder to generate the project file in, relative to the destination root folder."/>
                <parameter name="filenameFormat" defaultValue="[projectName].DataAccess.[extension]proj" isOptional="false" description="The project filename format specification."/>
                <parameter name="templateID" defaultValue="SD_VsNet2005Template" isOptional="false" description="The ID of the template to use for the VS.NET project file" valueType="templateID"/>
                <parameter name="useRootNameSpaceForProjectName" defaultValue="true" isOptional="false" description="Flag to signal if the rootnamespace specified should be used for the project name. If set to false, the property projectName has to be specified with the value to use for project name." valueType="boolean"/>
                <parameter name="alterWhenExistent" defaultValue="true" isOptional="true" description="Flag to signal if an existing project file should be altered or should be left alone." valueType="boolean"/>
                <parameter name="binRootFolder" defaultValue="DataAccess\" isOptional="true" description="The name of the root folder, relative to the destination root folder, where VS.NET should store the output folders like bin\debug."/>
                <parameter name="clearFileCacheAfterwards" defaultValue="true" isOptional ="true" description="Flag to signal if the filename cache has to be cleared after this task has been run succesfully." valueType="boolean"/>
                <parameter name="templateBindingDefinitionName" defaultValue="" isOptional="true" description="The name of the TemplateBindings from which to pick the templateID specified. Specifying this parameter will always force the templateID to be picked from the templateBindings with the name specified."/>
                <parameter name="projectName" defaultValue="" isOptional="true" description="The name to use for the project if useRootNameSpaceForProjectName is set to false or left empty. If projectName has been left empty, the ProjectName property value of the LLBLGen Pro project is used instead, if useRootNameSpaceForProjectname is set to false or left empty."/>
            </parameters>
    </task>



Thanks for any help you can provide,

Scott
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38086 posts
# Posted on: 27-Oct-2007 14:01:05.  
GizmoTN76 wrote:
I've got 2 questions I was hoping someone could help me out with:

1. I know you guys aren't officially supporting VS2008 yet, but is there any way short of writing a custom task performer to get llblgen to produce VS2008 project files? Every time I regen the projects it has to go through the project conversion wizard which is becoming a pain in the tail. If a custom task performer is the only solution is there any chance that someone else has already written one for this purpose?

I think it can be done with the same task performer, you just need a different template.
The VS.NET 2008 project file is a bit different in XML layout, but not that much. We'll release a vs.net 2008 project file format in 2.6 (the linq enabled version later this year), but if you want it now, you can do the following:
- generate code for vs.net 2005
- copy the csproj file
- open it in vs.net 2008, let it convert the project file
- save
- check the difference in the csproj files.
- make a copy of the vs.net 2005 project templates you're using. For selfservicing and adapter these are different and also it depends on which db you're using.
- alter these copies, so that they contain the differences you found between the project files earlier on.
- create a templatebindings file which binds these new templates (the copies you've made and altered) to new templateIDs
- alter the tasks which generate project files in the preset you're using in such a way that you're now using the new templateID's you defined in the templatebindings file you created in the previous step.

Quote:
2. I'm trying to use the ProjectFileCreator task to create a custom project for the manager templates, and it work, sorta, however it seems to be defaulting the obj and the property folders to the parent folder where the project file is getting created. This doesn't appear to happen with the default projects llblgen creates so I'm guessing I'm doing something wrong in the call to the task. Here's the task config I've got (this is for llblgen 2.5 btw)

Code:
    <task name="ManagerProjectCreator" assemblyFilename="SD.LLBLGen.Pro.TaskPerformers.dll"
            taskPerformerClass="SD.LLBLGen.Pro.TaskPerformers.ProjectFileCreator"
            description="Generates the VS.NET project file for the manager project. Be sure to place this at the end of the taskgroup." isOptional="false">
            <supportedPlatforms>
                <platform name=".NET 2.0"/>
                <platform name=".NET 3.0" />
            </supportedPlatforms>
            <supportedTemplateGroups>
                <templateGroup name="Adapter"/>
            </supportedTemplateGroups>
            <dependencies/>
            <parameters>
                <parameter name="destinationFolder" defaultValue="" isOptional ="false" description="The folder to generate the project file in, relative to the destination root folder."/>
                <parameter name="filenameFormat" defaultValue="[projectName].DataAccess.[extension]proj" isOptional="false" description="The project filename format specification."/>
                <parameter name="templateID" defaultValue="SD_VsNet2005Template" isOptional="false" description="The ID of the template to use for the VS.NET project file" valueType="templateID"/>
                <parameter name="useRootNameSpaceForProjectName" defaultValue="true" isOptional="false" description="Flag to signal if the rootnamespace specified should be used for the project name. If set to false, the property projectName has to be specified with the value to use for project name." valueType="boolean"/>
                <parameter name="alterWhenExistent" defaultValue="true" isOptional="true" description="Flag to signal if an existing project file should be altered or should be left alone." valueType="boolean"/>
                <parameter name="binRootFolder" defaultValue="DataAccess\" isOptional="true" description="The name of the root folder, relative to the destination root folder, where VS.NET should store the output folders like bin\debug."/>
                <parameter name="clearFileCacheAfterwards" defaultValue="true" isOptional ="true" description="Flag to signal if the filename cache has to be cleared after this task has been run succesfully." valueType="boolean"/>
                <parameter name="templateBindingDefinitionName" defaultValue="" isOptional="true" description="The name of the TemplateBindings from which to pick the templateID specified. Specifying this parameter will always force the templateID to be picked from the templateBindings with the name specified."/>
                <parameter name="projectName" defaultValue="" isOptional="true" description="The name to use for the project if useRootNameSpaceForProjectName is set to false or left empty. If projectName has been left empty, the ProjectName property value of the LLBLGen Pro project is used instead, if useRootNameSpaceForProjectname is set to false or left empty."/>
            </parameters>
    </task>



Thanks for any help you can provide,

Scott

I don't think the obj folder location is in that config, but in the template of the csproj file.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
GizmoTN76
User



Location:

Joined on:
22-Oct-2007 18:47:51
Posted:
33 posts
# Posted on: 28-Oct-2007 03:31:35.  
Thanks Otis, it turned out that the only difference in the template between 2005 and 2008 wast the addition of a ToolsVersion="3.5" attribute. There may be others as well but simply copying the templates and adding that to them made studio 2008 happy.

Here's the full line in the project file before:

Code:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


And the line in the project file after:
Code:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">


The obj and properties folders appear to get created whereever the project file lives. I pushed them into their associated projects and the folders followed. I don't know if it's a real issue or not but with the projects in a higher level folder like they are it seems like the obj and properties folders would get mixed between them.

Another question...

Aside from the 2 normal adapter projects, the dbgeneric and the dbspecific, I'm generating a 3rd for the manager templates which works great. What I can't seem to figure out is how to automatically make it reference the other 2 generated project files. Is there a way to do this? I could create a special template just for that project file with those projects hardcoded in there but it would be really slick if there was a way to make it add those references dynamically based on the other projects that got generated.

Thanks!
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14639 posts
# Posted on: 29-Oct-2007 10:31:26.  
Quote:
The obj and properties folders appear to get created whereever the project file lives. I pushed them into their associated projects and the folders followed. I don't know if it's a real issue or not but with the projects in a higher level folder like they are it seems like the obj and properties folders would get mixed between them.

I don't think that would be a problem.
Quote:
Aside from the 2 normal adapter projects, the dbgeneric and the dbspecific, I'm generating a 3rd for the manager templates which works great. What I can't seem to figure out is how to automatically make it reference the other 2 generated project files. Is there a way to do this?

I guess a similar question was asked herre:
http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=1901


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.