views:

16

answers:

1

Can anyone suggest a way to get the MVC templates installed without running the MVC exe.

I'm trying to get ASP.Net MVC 2 up and running, and I still don't have admin access to my PC (new job!) which you need to run the MVC installer.

I know you don't need the templates but I'm only beginning MVC so fine the templates really useful.

I've got the templates on my home PC, so should be able to xcopy them tonight to see if that works.

thanks in advance!

A: 

The VS template sources are stored in a number of folders under C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates. For example, the MVC C# templates (in English) are located under CSharp\Web\1033 in that folder.

You could copy the MVC templates into that location and then run devenv /installvstemplates from a VS command prompt to have them installed. However, running this command might require Admin rights.

Installation of templates means unpacking them into C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache under a corresponding path. This is actually the location where VS grabs files from when you create a new project from a template. You might be able to simply copy the unpacked templates into this folder but I'm not sure if some additional registration is not required for them to show up so the procedure from the previous paragraph is recomended.

Also note that the templates contain a reference to a custom wizard extension that invokes the MVC tooling's Add Unit Test project wizard. Since you will not have the MVC tooling installed you will have to remove that wizard extension reference from the installed templates. You will have to edit the *.vstemplate of every template that you want to use. The wizard extension entry is located at the end of that file.

Good luck, and note that it might just be easier to wait for Admin rights or get an Admin to install MVC for you.

marcind