小编hjd*_*hjd的帖子

当前上下文ASP.NET MVC5中不存在名称"Model"

我正在编写一个插件到NopCommerce 3.2,在视图中我得到上面提到的错误,但也有'布局'和'Html'.我复制了在另一个插件中工作的相同Web.Config.我还添加了与工作插件中使用的相同的引用.编译插件时,但我没有任何intellisense,并且不能相信VisualStudio正确地标记错误.我正在使用VS2013 Professional Update 1.

这是Web.Config文件:

<?xml version="1.0" encoding="utf-8"?>

<!-- We use this file to make razor intellisense work in the class library -->




<configuration>
  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <compilation targetFramework="4.5" />
    <pages …
Run Code Online (Sandbox Code Playgroud)

c# asp.net web-config nopcommerce asp.net-mvc-5

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

asp.net ×1

asp.net-mvc-5 ×1

c# ×1

nopcommerce ×1

web-config ×1