Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Custom Templates> How to get generated files added to csproj
 

Pages: 1
Custom Templates
How to get generated files added to csproj
Page:1/1 

  Print all messages in this thread  
Poster Message
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
164 posts
# Posted on: 13-Dec-2016 17:54:39.  
Hi,

Using LLBLGen 5, self servicing, I have created a preset and lpt template with a binding to generate a partial class per entity. On code generation the files are created correctly, but what is the trick to have the code generation update the csproj file so that they are included? At present I go to VS, "Show all Files" and include them manually which doesn't seem right.

Preset is a copy of the standard with this at the end:
Code:
    <taskPreset name="SD.Tasks.Base.ConsumeLptTemplate" displayName="JSON Ctor" >
    <parameters>
        <parameter name="destinationFolder" value="JsonCtors"/>
        <parameter name="filenameFormat" value="[elementName].[extension]"/>
        <parameter name="templateID" value="HSE_JSON"/>
        <parameter name="emitType" value="allEntities"/>
        <parameter name="failWhenExistent" value="false"/>
        <parameter name="templateBindingDefinitionName" value=""/>
        <parameter name="compileOnly" value="false"/>
        <parameter name="debugBuild" value ="false"/>
        <parameter name="templateIsOptional" value="false"/>
        <parameter name="templateAssemblySourceFileFormat" value="templatesSource.[extension]" />
        <parameter name="elementFilter" value=""/>
        <parameter name="dependentUponFilenameFormat" value=""/>
    </parameters>
</taskPreset>
</taskPresets>
</preset>
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14421 posts
# Posted on: 14-Dec-2016 03:31:35.  
The TaskPreset should be in the same TaskGroup which has other Code File Generation Tasks.
And make Sure the Project File Generator task is the last one in the TaskGroup, as each File Generator task inserts the generated filename in a cache, which is then picked up by the Project File Generator.


  Top
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
164 posts
# Posted on: 14-Dec-2016 13:44:45.  
Thanks, that was it.
  Top
Pages: 1  


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

Version: 2.1.12172008 Final.