Multiple Solution Template

M

Mythran

I'm trying to make a multiple solution template suit my needs. So far, it's
working out a lot better and easier than expected. What I'm coming up short
on is using changing the Project Name and Default Namespace for projects to
be something like:

Project Name: Blah.Blah.$safeitemname$.$safeprojectname$

The project file in the template structure has the above project name
defined with the variables above as well, but the project, when created via
the template, always defaults to the filename for the project (in my case,
BLL, DAL, Schema, WebUI, or Exceptions).

Anyone know if it's possible to do this using Microsoft Visual Studio 2008
templates?

Thanks,
Mythran
 
M

Mythran

Scott M. said:
You have created a template that allows for multiple solutions
simultaneously?


Whoops! No no, I created a solution template that allows for multiple
projects. My fault, sorry I said solution instead of projects :p

Mythran
 
M

Michel LAPLANE \(MVP\)

Do you mean that you want to have a name of the project using "." in it?
If so i suppose this "." is not permitted as a replacement string.
To turn around, just create a wizard extension (that is not so difficult to
do if you use the sample in the VS HELP). So you can create
a new replacement variable $customname$ that you can fill with the string
you want trough a custom form included in the wizard extension.

Enjoy with VS
 
M

Mythran

Michel LAPLANE (MVP) said:
Do you mean that you want to have a name of the project using "." in it?
If so i suppose this "." is not permitted as a replacement string.
To turn around, just create a wizard extension (that is not so difficult
to do if you use the sample in the VS HELP). So you can create
a new replacement variable $customname$ that you can fill with the string
you want trough a custom form included in the wizard extension.

Enjoy with VS

Not exactly, the string I have in the file is like:

MyCompany.Applications.$safeitemname$.$safeprojectname$

The $safeitemname$ refers to the name entered by the user when he/she/it
creates the project. The $safeprojectname$ is the project's individual
name. So, I would like to end up with:

MyCompany.Applications.SomeSolutionName.WebUI
or
MyCompany.Applications.SomeSolutionName.BLL

I can do this manually, but I would like to get away with not having to do
this every time I create a project....

Thanks
Mythran
 
M

Michel LAPLANE \(MVP\)

I don't quite understand what you mean. If you want, and if you can, send me
your template file and csproj file so i perhaps can help.
By the way, if you would like to customize as you like your template, have a
look to the wizard extension so you can
modify lot of thing.
For example, for generating C# project and C# item using the addproject and
add item assistant, i was able to add unsuported file (like Visio files,
acces files, ... directly in my project) and rename them automatically after
the generation, with the name provided by the user in VS, using the method
RunFinished of the wizard extension. It is very powerful.
Enjoy with VS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top