在VS2013中使用报表设计器并获取程序集错误加载新报表

时间:2014-03-11 17:56:47

标签: c# asp.net-mvc asp.net-mvc-4

尝试在VS2013中使用报表设计器并收到以下错误:

Could not load file or assembly 'System.Web.Mvc, Version 2.0.0.0,Culture = neutrual, PublicKey Token = '31bf3856ad364e35' or one of its dependencies.  The system could not find the file specified

Web.config已经在其中:(重定向应该处理这个问题吗?)

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

这是主要的web.config。我需要别的东西吗?

1 个答案:

答案 0 :(得分:0)

Microsoft报表设计器,尤其是DataSet Designer,不支持项目中的绑定重定向。设计人员正在使用devenv.exe探测程序集,因此使用devenv.exe.config的绑定重定向。修复依赖链以匹配实际存在的内容将有助于解决此问题(在我的例子中,Unity.MVC5绑定Unity 3.0而不是Unity 3.5)。

我不愿意修改devenv.exe.config,因为它似乎会在某种程度上被VS踩到。

相关问题