Hi, I have started from the CSLA quickstart templates, but it's now heavily modified. When I save my csp files from my quickstart.cst, I do this :
<%@ Register Name="Dal" Template="CSharp\Dal\Dal.cst" MergeProperties="False" ExcludeProperties="" %>
...
var cspCommonPathFormat = Path.Combine(CodeTemplateInfo.DirectoryName, "Common\\{0}"); var cspCommonPath = string.Format(cspCommonPathFormat, "Dal.csp"); Dal csp = this.Create<Dal>(); this.CopyPropertiesTo(csp); // Save csp to Common folder csp.SavePropertiesToXmlFile(cspCommonPath);
This saves my dal.csp with this in it :
<
propertySet name="Dal.cs" output="Dal.cs" template="C:\path\CodeSmith\Stavibel\CSharp\Tests\Mocks\Mocks.cst">
But, what I want, is this
<propertySet name="Dal.cs" output="Dal.cs" template="..\CodeSmith\Stavibel\CSharp\Tests\Mocks\Mocks.cst">
How can I control the value saved for the template attribute?
Hello,
This currently is not possible. I have added this to the wishlist.
Thanks
-Blake Niemyjski
Blake Niemyjski CodeSmith Tools, LLC. Software Development Engineer Blog: http://windowscoding.com/blogs/blake/ .NetTiers team | Visit http://www.nettiers.net
Thanks for the quick update, until then I'll just modify the xml post saving.
Hello CodeSmith.
Actually I want the old format of saving Absolute path of each template. Because we always Keep our template in a particular location. All projects are referring the same location. So we are finding difficulty in this facility. Once open a Codesmith project in Manage output it automatically changes the file paths to relative paths. We appreciate your update. But by default we want it to store the absolute path.
Is there any way not to change the paths automatically? because once we open the manage output window. It changing automatically.
Regards
Salam
Yes, you can change this behavior by unchecking the convert to relative paths checkbox in the manage output options: http://docs.codesmithtools.com/display/Generator/Project+Options