2

I am using CodeSmith to Generate The Files in my Project. It has functionalities to Merge the C#/VB & SQL files using Insert Region & Preserve Region Strategies.

How Can I extend these to merge the XML files I am creating?.

Thanks

3 Answers3

1

Actually, CodeSmith supports merging XML files just like it does C# and VB files using regions. You just need to use <!-- region Some Region Name --> and <!-- endregion --> to mark and name your regions of code.

Does that help or do you need more information?

Eric J. Smith
  • 953
  • 8
  • 20
0

Whats the syntax for preserve regions for SQL? Is it:

--region Some Region Name
--endregion

Or something else?

Seeriuss
  • 41
  • 3
0

For T-SQL your code would need to look like this:

RegionNameRegex should be set to ^[ \t][ \s]"?(?i:Custom)"?; Language should be set to "T-SQL";

Your regions should look like this:

--region Custom Parameters

--endregion

I have created a sample template located here.

Thanks -Blake Niemyjski

Blake Niemyjski
  • 3,192
  • 3
  • 23
  • 40