0

This is specific to one particular project. Probably missing some directives in Web.Config. Trying to figure out what those directives are. I could probably do some diff compare with a project where the wizard works, but I'm too lazy...

4

1 回答 1

1

It's a Project Guid in the .csproj file that indicates that the project is an ASP.NET MVC project and enables the wizards.

For ASP.NET MVC 4 you need the following:

<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

and to enable Intellisense in Razor views you need the following key in your web.config:

<appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
</appSettings>

If this is an ASP.NET MVC 3 project then the value is:

<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

and:

<appSettings>
    <add key="webpages:Version" value="1.0.0.0" />
</appSettings>
于 2013-03-31T10:43:00.967 回答