Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create visual studio solution template - multiple projects

I'm stuck on this tutorial for creating a multi-project visual studio template. I'm specifically stuck on this line:

Select the files and folders to include in your template, right-click the selection, click Send To, and then click Compressed (zipped) Folder. The files and folders are compressed into a .zip file.

I did the following steps:

  1. Create 2 projects. (MyProj.Web and MyProj.Service)
  2. Reference MyProj.Service in MyProj.Web.
  3. Export both. They are now in a .zip file.

What do I do from here?

My intentions are: Make solution folders where some dlls will be (DI, unit testing frameworks, etc). Have these dlls referenced. Reference projects in other projects. Rename part of the projects. For eg. the ability to replace {MyProj}.Service with NewName.Service

like image 854
Shawn Mclean Avatar asked Feb 04 '11 16:02

Shawn Mclean


People also ask

Can a solution have multiple projects?

Solutions are essentially groups of projects. Most software applications involve more than one project, and so virtually every software application has a solution file organizing said projects. Sometimes, solutions have more than one application in them. Or they have lots of unrelated projects in them.

How do I create a solution file in Visual Studio 2019 for an existing project?

Add files to a solution To add an item to a solution, on the context (right-click) menu of the solution node in Solution Explorer, select Add > New Item, or Add > Existing Item. A solution file is a structure for organizing projects in Visual Studio.


1 Answers

The other parts includes making the .vstemplate xml file and placing the zip in the ProjectTemplates.

Per the article:

Put the .zip template file in the Visual Studio project template directory. By default, this directory is \My Documents\Visual Studio 2010\Templates\ProjectTemplates\

The Visual Studio template will then be available from File > New Project. If making a template for a single item, place it in the \ItemTemplates folder instead to make it available from the Add New Item context menu in Solution Explorer.

like image 185
Alvin Reyes Avatar answered Sep 24 '22 14:09

Alvin Reyes