SSIS Error The Execute method on the task returned error code 0x80131621

Error Message: The Execute method on the task returned error code 0x80131621 (Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.). The Execute method must succeed, and indicate the result using an "out" parameter.

 

Solution: 因为编译时引用的dll使用了不同的.NET Framework版本,需要添加 useLegacyV2RuntimeActivationPolicy=”true”

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

参考: http://www.daimto.com/execute-ssis-packages-with-c/

posted @ 2015-05-21 15:43  粪土  阅读(568)  评论(1编辑  收藏  举报