加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

无法从程序集’Microsoft.WindowsAzure.Storage,Version = 4.3.0

发布时间:2020-12-14 01:48:41 所属栏目:Windows 来源:网络整理
导读:我正在Azure数据工厂中运行自定义活动,当我尝试使用CloudAppendBlob时,会发生以下异常.它看起来像版本问题,但无法找到解决方法.我使用 Windows Azure Storage 7.0.0编译了代码.请帮忙! 模块中的未知错误: System.Reflection.TargetInvocationException: Ex
我正在Azure数据工厂中运行自定义活动,当我尝试使用CloudAppendBlob时,会发生以下异常.它看起来像版本问题,但无法找到解决方法.我使用 Windows Azure Storage 7.0.0编译了代码.请帮忙!

模块中的未知错误:

System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. —> System.TypeLoadException: Could
not load type ‘Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob’
from assembly ‘Microsoft.WindowsAzure.Storage,Version=4.3.0.0,
Culture=neutral,PublicKeyToken=31bf3856ad364e35’. at
MyDotNetActivity.SampleActivity.Execute(IEnumerable1 linkedServices,
IEnumerable
1 datasets,Activity activity,IActivityLogger logger) at
Microsoft.Azure.Management.DataFactories.Runtime.ActivityExecutor.Execute(Object
job,String configuration,Action`1 logAction) — End of inner
exception stack trace — at
System.RuntimeMethodHandle.InvokeMethod(Object target,Object[]
arguments,Signature sig,Boolean constructor) at
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters,Object[] arguments) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags
invokeAttr,Binder binder,Object[] parameters,CultureInfo culture)
at
Microsoft.DataPipeline.Compute.HDInsightJobExecution.ReflectingActivityWrapper.Execute()
in
f:_Bld127524106SourcesProductCommonComputesrcHDIComputeDelegatorJobReflectingActivityWrapper.cs:line
44 at
Microsoft.DataPipeline.Compute.HDInsightJobExecution.JobWrapper.RunJob()
in
f:_Bld127524106SourcesProductCommonComputesrcHDIComputeDelegatorJobJobWrapper.cs:line
94 at
Microsoft.DataPipeline.Compute.HDInsightJobExecution.Launcher.Main(String[]
args) in
f:_Bld127524106SourcesProductCommonComputesrcHDIComputeDelegatorJobLauncher.cs:line
78.

我自己遇到了同样的问题.原来,Azure Data Factory仅限于Microsoft.WindowsAzure.Storage的4.3版本.为了加载不同的版本,你应该看看微软的 CrossAppDomainDotNetActivitySample.

从自述文件:

This sample allows you to author a custom .NET activity for ADF that is not constrained to assembly versions used by the ADF launcher (e.g.,WindowsAzure.Storage v4.3.0,Newtonsoft.Json v6.0.x,etc.).

The code includes an abstract base class (CrossAppDomainDotNetActivity) that implements app-domain isolation and a sample derived class (MyDotNetActivity) that demonstrates using WindowsAzure.Storage v6.2.0.

Note: The public types exposed by the ADF SDK are not serializable across app domain boundaries. As such,the derived class must provide pre-execution logic (PreExecute) to process the ADF objects into a serializable object that is then passed to the core logic (ExecuteCore).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读