Hello!
I have CST (template) files for many classes from previous versions of CodeSmith. I need generate DLL files them.
Before version 6.x, there was a way to generate DLL right away. Now, if you give existing files to Generator, you get an empty DLL file.
I found the solution to get DLL from MSVS, but it is extremely time consuming when generating DLLs for dozens templates (http://docs.codesmithtools.com/display/Generator/Building%2C+Running%2C+and+Compiling+Templates)
With CodeSmith 6.0, is there a way to generate DLL file right from CST template without Visual Studio and get not empty DLL file?
Thanks!
Hello,
You would need to add the BaseRegionedTemplate to a new Visual Studio Project called BaseRegionedTemplate and then add the template and partial class to the solution and follow the steps described here (http://docs.codesmithtools.com/display/Generator/Building%2C+Running%2C+and+Compiling+Templates). Please note that you will also have to add a CodeTemplate Directive Attribute for NameSpace and ClassName to this template. http://docs.codesmithtools.com/display/Generator/The+CodeTemplate+Directive
From there you will just need to compile after following all the steps above and place the compiled assembly into the same directory as BaseDataObjectTemplate
Blake Niemyjski CodeSmith Tools, LLC. Software Development Engineer Blog: http://windowscoding.com/blogs/blake/ .NetTiers team | Visit http://www.nettiers.com
If you add your master template to a Visual Studio project and set the custom tool to TemplateSourceGenerator and build the solution after adding references to CodeSmith Generator it will create an template assembly. How many templates are you looking to create a Template Assembly for? Are you using master templates? After following the steps listed in the docs are you getting an empty assembly?
Blake Niemyjski: How many templates are you looking to create a Template Assembly for?
How many templates are you looking to create a Template Assembly for?
About 60.
Blake Niemyjski: Are you using master templates?
Are you using master templates?
No.
Blake Niemyjski: After following the steps listed in the docs are you getting an empty assembly?
After following the steps listed in the docs are you getting an empty assembly?
Yes. Using Generator (http://docs.codesmithtools.com/display/Generator/Setting+Properties), I get empty code, empty output window and empty DLL.
It there a way to easily generate code according to template in 6юч,
Thank,
Anton
Is there anyway you could send support the solution you created that creates an empty assembly. Also can you please expand on "It there a way to easily generate code according to template in 6юч," as I'm not following.
Blake Niemyjski: . Also can you please expand on "It there a way to easily generate code according to template in 6юч," as I'm not following.
. Also can you please expand on "It there a way to easily generate code according to template in 6юч," as I'm not following.
I mistyped, sorry :)
I meant Is there a way to easily generate code according to template in 6.x.
Blake Niemyjski: Hello, Is there anyway you could send support the solution you created that creates an empty assembly.
Is there anyway you could send support the solution you created that creates an empty assembly.
Here you are:
http://dl.dropbox.com/u/3405618/BaseRegionedTemplate.cst
http://dl.dropbox.com/u/3405618/BaseRegionedTemplate.cst.cs
Before CodeSmith 6.x, Generator resolved references by itself and it I needed is click Generate. Now, it seems tha tname of namespace in BaseRegionedTemplate.dll will be not "BaseRegionedTemplate" but "BaseRegionedTemplate_cst" and BaseDataObjectTemplate will not find the refenced library.
If you can generate BaseRegionedTemplate.dll, then there will be the next step: generate BaseDataObjectTemplate, which references BaseRegionedTemplate.dll.
Can you please help with BaseDataObjectTemplate generating as well? Links to BaseDataObjectTemplate are:
http://dl.dropbox.com/u/3405618/BaseDataObjectTemplate.cst
http://dl.dropbox.com/u/3405618/BaseDataObjectTemplate.cst.cs
Thanks,Anton