CodeSmith Community
Your Code. Your Way. Faster!

BUG: Properties get reset when running NetTiers with cs.exe

Latest post 07-05-2007 12:44 PM by altin. 3 replies.
  • 01-10-2007 9:33 AM

    • altin
    • Top 150 Contributor
    • Joined on 10-19-2004
    • London, UK
    • Posts 35
    • Points 830

    BUG: Properties get reset when running NetTiers with cs.exe

    If you run the NetTiers template via cs.exe in NAnt the properties get reset and the code gets generated in the default directory (c:\NetTiers).

     

    This bug does not show itself when you are running the template from the CodeSmith IDE.

     

     

    The problem seems to be within the OnPropertyChange event in NetTiers.cst (line 375-392):

     

                #region OnPropertyChanged

                #if CodeSmith40

                protected override void OnPropertyChanged(string propertyName)

                {

                            if((this.State == TemplateState.Default || this.State == TemplateState.Validating)

                                        && propertyName == "ChooseSourceDatabase")

                            {

                                        MappingFile = "";

                                        OutputDirectory = "";

                                        RootNameSpace = "";

                                        WebServiceOutputPath = "";

                                        WebServiceUrl = "";

                            }

                           

                            base.OnPropertyChanged(propertyName);

                }

                #endif

                #endregion

     

    Commenting out the resetting of the properties solves the problem.
    • Post Points: 35
  • 01-18-2007 10:29 AM In reply to

    • madpeter
    • Top 150 Contributor
    • Joined on 03-10-2004
    • Posts 35
    • Points 815

    Re: BUG: Properties get reset when running NetTiers with cs.exe

    Hi
    I also have been having the same problems when regenerating using MSBuild. The Generation is not where I expect it to be and when I search for it it is in C:\NetTiers. Has this problem been addressed in the latest version from SVN ? thanks Peter
    • Post Points: 5
  • 03-29-2007 6:22 AM In reply to

    • altin
    • Top 150 Contributor
    • Joined on 10-19-2004
    • London, UK
    • Posts 35
    • Points 830

    Re: BUG: Properties get reset when running NetTiers with cs.exe

    This is still in the release from last week, will it be included in the nightly build?

    Thanks

    Mattias

    • Post Points: 5
  • 07-05-2007 12:44 PM In reply to

    • altin
    • Top 150 Contributor
    • Joined on 10-19-2004
    • London, UK
    • Posts 35
    • Points 830

    Re: BUG: Properties get reset when running NetTiers with cs.exe

    I just downloaded v2.1.0.583 from the nightly builds and the problem is still there...Have I missed something?

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