"您必须添加对程序集'System.Data.Services.Client,Version = 3.5.0.0'的引用"

rou*_*tic 4 .net azure azure-table-storage asp.net-mvc-2

我正在使用Windows Azure Table构建应用程序.我已将对Table Service的所有调用封装到自己的程序集中.此程序集使用.NET 4.0 Framework并包含对System.Data.Service.Client(4.0)的引用.我可以在没有问题的情况下从测试项目中使用这个程序集.

当我添加此项目作为MVC2 Web应用程序的引用 - 再次针对.NET 4.0框架 - 我得到上述错误.我将相同的DLL(v.4.0)添加到Web项目,但问题仍然存在.

到底是怎么回事?为什么我需要使用MVC项目中的3.5 DLL?

rou*_*tic 5

我将以下内容添加到我的web.config文件中,所有内容都是copacetic.

<system.web>
  <compilation debug="true" targetFramework="4.0">
    <assemblies>
      <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    </assemblies>
  </compilation>
</system.web>
Run Code Online (Sandbox Code Playgroud)