20

I Migrate my project to mvc 5.0 and razor engin 3 with Microsoft Instruction

But when open my solution Get this: enter image description here

The Web project 'ProjectName' requires missing web components to run with Visual Studio. Would you like to download and install them using the Web Platform Installer now? (Note: Some components might require restart to take effect.)

ASP.NET Web pages with Razor syntax 3.0.0.0

I also read this and this

but these answer doesn't help me I appreciate for any help

Update: My Project Build Very well and works without any exception with razor 3 and mvc 5 but just Intellisense doesn't sense my Typing and coloring my Code

and also when change this line to Value="2.0.0.0" in Application web Config file above error vanish and intelisens works fine

<appSettings>
    <add key="webpages:Version" **value="3.0.0.0"** />
...
</appSettings>

Update After some while, now you can user razor 3 on vs 2012. Here you can upgrade

Community
  • 1
  • 1
Mohammadreza
  • 3,139
  • 8
  • 35
  • 56

5 Answers5

42

I had this problem after installing Visual Studio 2012.

What solved for me was installing the Visual Studio Updates:

  1. Tools> Extensions And Updates
  2. Select "Updates" in the accordion list on the left.
  3. Select "Product Updates".
  4. Update to the newest version (At the time of writing of this answer it was Update 4)
André Lourenço
  • 668
  • 5
  • 10
  • thanks but i don't think your soloution belong to my question. – Mohammadreza Dec 14 '13 at 08:45
  • Why not? I had the exact same problem after I installed VS2012 and MVC5 and tried to open a MVC5 project. – André Lourenço Dec 15 '13 at 11:51
  • 2
    This answer **is** correct, the tools won't work without Update 4. You *also* need the web tools mentioned in [developerturk's answer](http://stackoverflow.com/a/20473069/38360). – Aaronaught Dec 31 '13 at 16:43
  • 2
    This worked for me as well. As soon as I updated my VS 2012 to Update 4, my Razor 3.0 references worked. – uadrive Jan 01 '15 at 18:34
4

Solved: Follow the below steps, It worked for me: a)Install VS 2012 Update 4 (http://www.microsoft.com/en-gb/download/details.aspx?id=39305)

b)ASP.NET and Web Tools 2013.1 for Visual Studio 2012 Download link Available here (http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx)

c) Restart your dev box

3

I Found The Problem, vs 2012 doesn't support it(see update section of this answer)

From Here said:

Unlike Razor V2 runtime and design time, VS2013 did not GAC these binaries. Instead, the binaries are installed in the project bin folder when corresponding NuGet package is installed, and in “%ProgramFiles (x86)%\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\Web\Razor\v3.0” to support design time.

So we don't have these dlls in above path when upgrade to mvc5 /razor 3

also read this stack question

update: now support it , update vs from here

Community
  • 1
  • 1
Mohammadreza
  • 3,139
  • 8
  • 35
  • 56
3

I solve this problem. VS 2012 support it.

from install setup file here upgrade for Visual Studio 2012

  • 2
    You could type write the answer on your own, in my opinion if you want to put just one link it's better to use comments below the question. – Tafari Dec 09 '13 at 14:51
1

For me was installing the Visual Studio Updates:

Tools> Extensions And Updates
Select "Updates" in the accordion list on the left.
Select "Product Updates".
Update to the newest version

(At the time of writing of this answer it was Update 4)

Alex Gyoshev
  • 11,929
  • 4
  • 44
  • 74