Visual studio template

Posted by RohiK under Regular Expressions on 12/7/2010 | Points: 10 | Views : 996 | Status : [Member] | Replies : 3
hi,

just like visual studio template for class files , i want to create my own template . how to do that?
and I want to parse into my code

plz help

Happy Programming!!
Rohi



Responses

Posted by: SheoNarayan on: 12/7/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Read this article http://www.carlosag.net/Articles/createVSTemplate.aspx that has the steps to create your own custom template for Visual Studio, however this is explained using older version of VS, however this may give you some idea.

Even http://www.codeproject.com/KB/dotnet/krevera_template_manager.aspx article may help you.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RohiK on: 12/8/2010 [Member] Starter | Points: 25

Up
0
Down
Thanks for reply.

I am doing it with little difference. I am building my own snippet in XML. and parsing it then my code will generated.
but I want to ask in that is it possible to add any variable in xml file like $tablename and I will replace this while parsing ..?

suppose my snippet will be <Header>SelectFrom$tableName</Header>
this will replace like - SelectFromAdmin (Admin is table name).

is that possible ???

Happy Programming!!
Rohi

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 12/8/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
I think if you are building your own code in XML, you can do whatever you want to do. You will need to take care of this scenario when you are parsing the code from the xml. So it will be completely customized based on your need and you can do whatever you want to do.


Regards,
Sheo Narayan
http://www.dotnetfunda.com

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response