How to install the Templates in VS?

How to install the Templates in VS?

Old forum URL: forums.lhotka.net/forums/t/2727.aspx


josh.kodroff posted on Wednesday, April 18, 2007

I'm completely new to templates in VS 2k5 or otherwise, but it looks like they'll be tremendously useful.  My only problem is that I can't figure out how to install them.

I found the template install wizard, but I can't select more than one file at once, which is particularly annoying.  There must be a better way to get the CSLA.NET templats into VS2k5.

Can anyone help?

Thanks.
JK

RockfordLhotka replied on Wednesday, April 18, 2007

The "templates" provided in the CSLA .NET download are not VS templates. They are templates in the broader sense of being illustrations of the basic structure of the classes.

There is a CodePlex project to build actual VS templates, and you might check that out. Go to CslaContrib and there's a link to the other project from there.

tiago replied on Wednesday, April 18, 2007

Hi Josh,

I guess you found it.
File -> Export Template -> Item Template -> etc, etc

It's annoying all right.After you export all 12 templates, you can find them at "D:\Documents and Settings\USER\My Documents\Visual Studio 2005\Templates\ItemTemplates". In that folder, I made a CSLA folder and put them there.

Back in VS2005, click the project (not the solution) and Add -> Classe; under "Visual C# Project Items" you have a CSLA folder with all your templates.

Regards
Tiago

________________________________

De: josh.kodroff [mailto:cslanet@lhotka.net]
Enviada: qua 18-04-2007 17:09
Para: tfl
Assunto: [CSLA .NET] How to install the Templates in VS?


I'm completely new to templates in VS 2k5 or otherwise, but it looks like they'll be tremendously useful. My only problem is that I can't figure out how to install them.

I found the template install wizard, but I can't select more than one file at once, which is particularly annoying. There must be a better way to get the CSLA.NET templats into VS2k5.

Can anyone help?

Thanks.
JK


RockfordLhotka replied on Wednesday, April 18, 2007

It is true you can do that - but even so, the files in the zip file are not VS templates.

Real VS templates have placeholders and other special characteristics that allow them to work properly when used as an actual template for adding a class. I did not do that in the files in the zip archive.

If you want real VS template behaviors, the CodePlex project is the place to look.

tiago replied on Thursday, April 19, 2007

RockfordLhotka:
Real VS templates have placeholders and other special characteristics that allow them to work properly when used as an actual template for adding a class. I did not do that in the files in the zip archive.

Hi Rocky,

Since there are proper Templates.sln and Templates.csproj files and since all templates refer the "Templates" namespace, the File -> Export Template, etc. takes care of the namespace placeholder.

When you insert a template with Add -> Class, etc. VS automatically fills in the correct namespace.

Regards,
Tiago

RockfordLhotka replied on Thursday, April 19, 2007

It does the class names too? Well that’s very cool J

 

From: tiago [mailto:cslanet@lhotka.net]
Sent: Thursday, April 19, 2007 8:06 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: How to install the Templates in VS?

 

RockfordLhotka:

Real VS templates have placeholders and other special characteristics that allow them to work properly when used as an actual template for adding a class. I did not do that in the files in the zip archive.

Hi Rocky,

Since there are proper Templates.sln and Templates.csproj files and since all templates refer the "Templates" namespace, the File -> Export Template, etc. takes care of the namespace placeholder.

When you insert a template with Add -> Class, etc. VS automatically fills in the correct namespace.

Regards,
Tiago



tiago replied on Friday, April 20, 2007

RockfordLhotka:

It does the class names too? Well that’s very cool J

 

Yes, it does the class names too.

Copyright (c) Marimer LLC