运行DLL以执行SSIS包时出现C#错误 [英] C# error when running DLL to execute SSIS package

查看:83
本文介绍了运行DLL以执行SSIS包时出现C#错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,这是我第一次在这里发布.如果我不在正确的部分,请告诉我.该主题与.Net中的几个项目相关,因此这是我能找到的最通用的主题:)我开发了一个C#类库,该库将从 共享文件系统.该dll被Microsoft Dynamics导航客户端使用.在我的开发机器上运行正常,但在生产客户端上,出现以下错误:

Hello, this is my first time posting here. If I am not in the correct section, please let me know. This topic ties in several items in .Net, so it was the most general I could find :) I developed a C# class library that will execute SSIS packages from a shared file system. The dll is being consumed by the Microsoft Dynamics NAV client. It works fine on my development machine but on a production client, I am getting the following error:

Microsoft Dynamics导航
---------------------------

Microsoft.SqlServer.Dts.Runtime.TaskHost/中的FailureError:任务上的Execute方法返回了错误代码0x80131621(混合模式程序集是针对运行时的版本"v2.0.50727"构建的,如果没有其他配置,则无法在4.0运行时中加载 信息.). Execute方法必须成功,并使用"out"指示结果.参数.

---------------------------

---------------------------

Microsoft Dynamics NAV
---------------------------

FailureError in Microsoft.SqlServer.Dts.Runtime.TaskHost/ : 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.

---------------------------
OK
---------------------------

经过研究,我发现许多线程声称您需要将这些行添加到app.config文件中

Upon researching, I have seen many threads claiming you need to add these lines to the app.config file

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

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

我已将它们添加到配置中,但还是没有运气.

I have added these to the config but still no luck.

我不明白为什么它在一台机器上却不能在另一台机器上工作.有人知道我在想什么吗?

I am not understanding why it is working on one machine but not the other. Does anybody know what I am missing? 

谢谢

迈克

推荐答案

迈克

>> Microsoft Dynamics导航客户端正在使用该dll.在我的开发机器上运行正常,但在生产客户端上,出现以下错误.

>>The dll is being consumed by the Microsoft Dynamics NAV client. It works fine on my development machine but on a production client, I am getting the following error.

首先,由于您的dll在开发计算机上工作,因此我认为您的dll是正确的.

Firstly, since your dll works on development machine I think your dll is right.

第二,正如您提到的Microsoft Dynamics导航客户端.抱歉,我不擅长Microsoft Dynamics.我想知道是否存在生产客户端环境问题.

Secondly, as you mentioned  Microsoft Dynamics NAV client. Sorry I am not good at  Microsoft Dynamics. I wonder if there is a production client environment issue.

如果有帮助,请检查以下链接.

Please check the following link if helps or not.

如何:为Microsoft Dynamics导航Web安装和配置Internet信息服务客户

https://msdn.microsoft.com/en-us/library/hh168952(v = nav.90).aspx

在这里,我还找到了与您类似的主题.另请检查您的Web配置文件是否引用了正确的版本dll.

Here I also found a similar thread like yours.  Please also check your web config file reference the right version dll.

最后,请与您的开发机器进行比较,以检查是否错过了一些东西 在生产客户端上.

At last, please compare with your development machine to check if you miss something on a production client.

最诚挚的问候,

克里斯汀


这篇关于运行DLL以执行SSIS包时出现C#错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆