CodeSmith Community
Your Code. Your Way. Faster!

Different generation behaviour on same Codesmith Project file (csp)

Latest post 01-10-2008 4:00 AM by Geminior. 4 replies.
  • 11-21-2007 3:56 AM

    • hde
    • Not Ranked
    • Joined on 09-18-2006
    • Posts 4
    • Points 140

    Different generation behaviour on same Codesmith Project file (csp)

    When I generate wihtin CodeSmith Studio, I have no problems.

     All my CodeSmith Projects files generate fine.

    When I generate from within Visual Studio, or within Windows Explorer,  some of them raise an error during generation :

    Generating project "Z:\Development .Net\Next Release\2. Modules\Financial Studio Maestro\Maestro.Business\Code Generation\RuntimeParameterInfoRList.csp" outputs...

    Compiling template "C:\CodeSmith\Templates\Finarch Templates 2.0.0\CS\Csla20\ReadOnlyRootList.cst"...

    Template compilation succeeded. (245 ms)

    Rendering output 1...

    ERROR: Z:\Development .Net\Next Release\2. Modules\Financial Studio Maestro\Maestro.Business\Code Generation\RuntimeParameterInfoRList.csp(0,0) Output 1: Exception has been thrown by the target of an invocation. Object reference not set to an instance of an object.

    Unable to render output 1, skipping...

    Done rendering outputs: 0 succeeded, 1 failed (1331ms).

    Any advice is wellcome.

     Thx

    • Post Points: 65
  • 01-09-2008 6:18 AM In reply to

    • Geminior
    • Not Ranked
    • Joined on 01-02-2008
    • Posts 2
    • Points 40

    Re: Different generation behaviour on same Codesmith Project file (csp)

    I am experiencing similar behavior.

    Using Codesmith Studio template generate and respond to changes in the configuration as expected.

    Using the Codesmith Explorer changes to the configuration are seemingly ignored. I have tried refreshing, closing and opening but the configuration still seems to be cached.
    The configuration pane of the Explorer correctly shows the changes but they are not used during the generation phase.

    In frustration I recompiled our extension library with some Response.Write 'debugging' and magically and suddenly the explorer behaved the same as the Studio.
    I then made a change to a text file used as input to the template (field exludes) and again Explorer ignored the change while Studio executed properly.

    This is a huge issue seeing as most our developers are using the standard version and only have access to the Explorer.
    The caching that is going on may have been intended as a feature but it most certainly is not.

    • Post Points: 35
  • 01-09-2008 3:02 PM In reply to

    • shannon
    • Top 50 Contributor
    • Joined on 03-06-2007
    • Posts 72
    • Points 4,975

    Re: Different generation behaviour on same Codesmith Project file (csp)

     What version of CodeSmith are you using?  We released a maintenance version in August that included a way to refresh cache when altering configuration values.

    • Post Points: 35
  • 01-09-2008 5:45 PM In reply to

    • shannon
    • Top 50 Contributor
    • Joined on 03-06-2007
    • Posts 72
    • Points 4,975

    Re: Different generation behaviour on same Codesmith Project file (csp)

    The error messages displayed when error occur during execution of csps do not provide enough useful information.  We have recreated this issue and are currently working on a fix for this.

    • Post Points: 5
  • 01-10-2008 4:00 AM In reply to

    • Geminior
    • Not Ranked
    • Joined on 01-02-2008
    • Posts 2
    • Points 40

    Re: Different generation behaviour on same Codesmith Project file (csp)

    Hi

     

    Using version 4.1.2 rev 2729, which according to the application itself is the latest version.

    But then I am not actually changing the configuration itself, I am changing a text file that a configuration setting points to and that the template uses to evaluate columns to skip for various tables.

    For some reason the Explorer does not read the file on every run, in fact the caching mechanism is very long lived so not even a restart of the explorer solvs the issue. A computer restart does, but that seems a bit harsh to do that every time you need to change a config value... ;)

    • Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems