Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Razor 我认为编译错误_Razor_Html.beginform - Fatal编程技术网

Razor 我认为编译错误

Razor 我认为编译错误,razor,html.beginform,Razor,Html.beginform,当我运行我的程序时,我总是在我的视图中看到这个错误消息,我真的不知道出了什么问题。。 错误消息 CS0012:在未引用的程序集中定义了类型“System.Object”。您必须添加对程序集“System.Runtime,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”的引用。 @使用(Html.BeginForm(“Register”、“MyAccount”、FormMethod.Post、new{@class=“

当我运行我的程序时,我总是在我的视图中看到这个错误消息,我真的不知道出了什么问题。。

错误消息 CS0012:在未引用的程序集中定义了类型“System.Object”。您必须添加对程序集“System.Runtime,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”的引用。

@使用(Html.BeginForm(“Register”、“MyAccount”、FormMethod.Post、new{@class=“form horizontal”、role=“form”}))

尝试此链接

它建议更改配置文件以更正此错误,包括将现有部分更改为如下所示:

<compilation debug="true" targetFramework="4.5">
      <assemblies>     
        <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />   
      </assemblies>
</compilation>