codesmithtools / Templates

CodeSmith Generator Templates
http://www.codesmithtools.com/product/generator
54 stars 35 forks source link

Revision 1560 causes KeywordRenameAlias.cmap to fail and significant compile errors. #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Downloaded Revision 1560 from SVN
2. Updated extensive
Templates\Frameworks\Csla\Common\KeywordRenameAlias.cmap changes file from
another PC. (to my build server).
3. Ran Entity.csp -> generate all.
4. >150 Compile errors all relating to KeywordRenameAlias.cmap.

What is the expected output? What do you see instead?
KeywordRenameAlias is now a critical process for the templates to compile
for anyone that writes custom code against business objects (which would be
99% of people).

What version of the product are you using?
r 1560

Please provide any additional information below.
Tried hand building the Codesmith CSLA.sln but found the
Templates\Frameworks\Csla\Source\GlobalAssemblyInfo.cs include v1.5.0.0
values which didn't make sense.  If I modified other parts of the *cst the
changes flowed through. Forgot how to debug this style of template to find
the error. I'm hoping that is a PEBKAC.

Got a little annoyed with this problem.

Original issue reported on code.google.com by JenasysD...@gmail.com on 28 Mar 2010 at 12:03

GoogleCodeExporter commented 9 years ago
The following unit test fails. Note: Assert 2 is an entry in my
KeywordRenameAlias.csmap file.
[Test()]
        public void RenameTest()
        {
            Stopwatch watch = Stopwatch.StartNew();
            //   This is a simple one that is provided as a default keyword alias.
            Assert.AreEqual("identification",Util.NamingConventions.VariableName("ID"));
            Assert.AreEqual("IsCurrent",
Util.NamingConventions.VariableName("blnBDMCurrent"));

            Console.WriteLine("Time: {0} ms", watch.ElapsedMilliseconds);
        }

Original comment by JenasysD...@gmail.com on 28 Mar 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Blake, This is a very urgent issue!

Original comment by JenasysD...@gmail.com on 28 Mar 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Blake,
Nights sleep always helps with these issues.  I figured it must be getting the 
wrong
path for the file, so I did some more work to the above Nunit test and added 

string path;
CodeSmith.Engine.Map.TryResolvePath("KeywordRenameAlias", string.Empty, out 
path);
Console.WriteLine(string.Format("KeywordRenameAlias path: '{0}'", path));

That highlighted that the code was trying to use a completely different path to 
the
KeywordRenameAlias file than I expected.  A.k.a. the user profile
'C:\Users\%CurrentUser%\Documents\CodeSmith\Maps\KeywordRenameAlias.csmap' 
rather
than the verion I have in my svn download, where the templates are theoretically
getting exectuted.

Ok what have I done wrong? 

Codesmith v5.2.1. 

Original comment by JenasysD...@gmail.com on 28 Mar 2010 at 10:31

GoogleCodeExporter commented 9 years ago
If I delete the file from the user profile document, it then wants to use the
following file.
'C:\Program Files (x86)\CodeSmith\v5.2\Maps\KeywordRenameAlias.csmap'.

Original comment by JenasysD...@gmail.com on 28 Mar 2010 at 10:34

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 29 Mar 2010 at 6:03

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 21 Jun 2010 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 15 Jul 2010 at 2:21