Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.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
.net 迁移到MVC3_.net_Asp.net Mvc 3_Asp.net Mvc 2_Spark View Engine - Fatal编程技术网

.net 迁移到MVC3

.net 迁移到MVC3,.net,asp.net-mvc-3,asp.net-mvc-2,spark-view-engine,.net,Asp.net Mvc 3,Asp.net Mvc 2,Spark View Engine,我正在尝试从MVC2迁移到MVC3。我用的是Spark view引擎。更改引用后,我的Spark page基类中只有2个错误: The type 'System.Web.Mvc.IView' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=n

我正在尝试从MVC2迁移到MVC3。我用的是Spark view引擎。更改引用后,我的Spark page基类中只有2个错误:

The type 'System.Web.Mvc.IView' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. C:\Dev\main\app\Web\Html\SparkPageBase.cs


The type 'System.Web.Mvc.IViewDataContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.    C:\Dev\main\app\Web\Html\SparkPageBase.cs

如何解决此问题?

尝试下载并使用Spark View Engine for MVC3


尝试下载并使用适用于MVC3的Spark View引擎


在您修改web.config使其具有以下版本的
System.web.Mvc

<dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
  </dependentAssembly>

在您修改web.config以使
System.web.Mvc具有以下版本后,查看它是否工作

<dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
  </dependentAssembly>