且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

未找到 System.Data 程序集

更新时间:2023-11-21 18:15:16

将此添加到 app.config..

Add this to app.config..

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>

如果您需要在 Windows 服务中加载旧版本的 dll,您必须添加它.对于 Web 服务,iis 会自动处理它,但不适用于 Windows 服务.

If you need old versions of dlls to be loaded in a windows service you must add this. For web services iis automatically takes care of it, but not for windows service.