开发者

mvc 3 issues after converting 2: model + Model + Html + not supported type

I used the conversion tool to convert to mvc 3 from mvc 2.

I create a new partial view, select razor, check "Reference script libraries" (not sure what this means), select "Link (urlme.Model)" for strongly-type, List, OK.

I get the following errors:

  • List item
  • The name @model does not exist in the current context
  • The name Model does not exist in the current context
  • The name @Html does not exist in the current context
  • Element 'urlme.Model.Link' is not supported (standard c# cl开发者_如何学Cass leftover before conversion)

Do I need to add some references?? Any help would be appreciated. I'm stoked to use mvc 3!! Thanks!


I'm guessing you might be missing the Razor sections in Views\Web.config. Please compare the contents of that file with the one generated via the new project template.

Note that Eilon's v2 -> v3 upgrade tool currently only targets MVC3 Beta, so it might not do all the things necessary for RC2. I'm sure Eilon will post an updated version of that tool at some point in the future.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜