开发者

How to install ASP.NET MVC 2 templates after already installing VS Web Dev 2010 first?

First off these questions are related but do not fix my problem:

Missing Project Template after installing ASP.NET MVC 2

Used Web Platform installer to install the MVC Framework but the MVC template isn't available

I have installed Visual Studio Web Developer Express Edition 2010, then I installed MVC 2. Now I can successfully run a MVC 2 application, however I have to do the manual impor开发者_JAVA技巧ts of the namespaces and stuff.

How can I install the templates?


You could try copying the project templates from the default folder into the personal templates folder. To do this:

  1. Go to "%PROGRAMFILES%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Web\1033" (folder might vary since I'm using VS2010 Ultimate, but you can locate the folder easily by just looking for ProjectTemplates folder at %PROGRAMFILES%).
  2. Locate and copy the MvcWebApplicationProjectTemplatev2.0.cs.zip and EmptyMvcWebApplicationProjectTemplatev2.0.cs.zip files into "%HOMEPATH%\My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#"
  3. If you are running Visual Studio you'll need to restart it before you can see any effects.

Note that if you are VB.NET instead of C# you'll need to adjust the provided paths to match VB.

Nevertheless I'd suggest that you try uninstalling and then re-installing ASP.NET MVC since this steps won't plug-in all the tooling MVC provides for VS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜