Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
696 views
in Technique[技术] by (71.8m points)

visual studio 2010 - Razor Intellisense Not Working VS2010 SP1Rel MVC3 from WPI Win7 x64

I have Visual Studio 2010 /SP1 / MVC 3 (With April Tools Update) installed on a machine with a fresh install of Windows 7 64-bit Professional.

I do not have resharper installed. I never installed an RC or Beta of anything on this new OS Install.

My install steps were as follows:

  1. Install Visual Studio Professional.
  2. Install Web Platform Installer.
  3. Install Visual Studio SP1 from WPI.
  4. Install Microsoft ASP.net MVC 3 (with April Tools Update)
  5. Install Productivity Power Tools

Help > About Microsoft Visual Studio shows:

Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel

Microsoft .NET Framework Version 4.0.30319 SP1Rel

System.Web.Mvc.dll file version shows: 3.0.20105.0

Once installed I did the following:

  1. Open Visual Studio.
  2. File > New Project
  3. Choose "ASP.Net MVC 3 Web Application".
  4. On the "New ASP.NET MVC 3 Project" dialog. I chose "Internet Application", "Razor" View Engine. Hit OK.

Within the project here is the behavior:

  1. Open any cshtml file and Razor @blocks are not highlighted.
  2. Intellisense gives html snippets as options in and outside of razor blocks but does not recognize Html helpers or models etc within them.
  3. The project builds.
  4. You can run the project and everything works when built. Razor views are rendered normally.

Does anyone know a definitive set of prerequisites to have Razor Intellisense working? Something I can diff between the other Win7 64-bit machines that have Razor Intellisense working and the 2 that have this issue? Registry entries? Are there any Visual Studio logs that can help debug this? After hours of frustration and reading every Razor Intellisense post and question I have run across without coming up with anything that works I am just hoping for some new thoughts on what to troubleshoot/try next.

Thanks for any help on this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I know it's been a while since the last post, but I fixed mine by uninstalling MVC 2 and MVC2 VS Tools, and only leaving MVC 3 installed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...