Just installed Microsoft Visual Web Developer 2010 and trying to create an MVC application with Razor View Engine.
When opened a ".cshtml" file, I am not able to get colors for syntaxes in editor and also intellisense is not appearing. Is there any option I explicitly need to enable it?
Right click the Views\HelloWorld folder and click Add, then click MVC 5 View Page with Layout (Razor). In the Specify Name for Item dialog box, enter Index, and then click OK. In the Select a Layout Page dialog, accept the default _Layout. cshtml and click OK.
Right-click in the Store Index action method and select Add View as before, select Genre as the Model class, and press the Add button. This tells the Razor view engine that it will be working with a model object that can hold several Genre objects.
Razor View Engine is a markup syntax which helps us to write HTML and server-side code in web pages using C# or VB.Net. It is server-side markup language however it is not at all a programming language.
UPDATE: The Release Candidate finally supports Razor IntelliSense.
Update2: The final release got announced here and it also still supports Intellisense for Razor syntax. Woohoo!
Here's a screenshot of the new enhanced Intellisense and Razor syntax highlighting:
For a great overview/introduction to MVC3 and NuGet I suggest you take a look at this PDC10 video.
Previous Answer
No. It doesn't work yet with the current beta:
Razor intellisense isn't in today's beta. We needed to do a little more testing (and bug fixing) before we were ready to distribute it broadly. It patches a few VS files and so we need to make sure it is 100% solid before giving it out broadly.
It will definitely be in the final release, though, and should be available for people to install in the next few weeks.
Thanks,
Scott
Taken from http://weblogs.asp.net/scottgu/archive/2010/10/06/announcing-nupack-asp-net-mvc-3-beta-and-webmatrix-beta-2.aspx#7624491
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With