SSIS:.NET Framework 项目中 System.Runtime 版本 6.0.0.0 的 FileLoadException

问题描述 投票:0回答:1

在 SSIS 2022 中运行我的脚本组件时,我遇到了

FileLoadException
,特别是与加载
System.Runtime
程序集版本 6.0.0.0 相关。完整的错误信息如下:

Could not load assembly l'assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

在SSIS包中,我有Azure blob方法来上传一些附件。 所有 Azure blob nuget 都是最新的。

环境:

  • 目标:.NETframework 4.7
  • 开发环境:Visual Studio 2022
  • 操作系统:Windows 11

我找到了数百条建议,但没有一个对我有帮助。

我在app.config中手动添加了程序集

<dependentAssembly> <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/> </dependentAssembly>
,没有结果。

c# .net azure-blob-storage .net-assembly
1个回答
0
投票

解决步骤:

  • 将 Azure.Blob NuGet 降级至版本 12.13.1,确保仅与 .NET Standard 兼容。
  • 在全局程序集缓存 (GAC) 中注册了必要的 DLL/NuGet。

SSIS 或控制台应用程序的故障排除提示:

  • App.config 检查:确保它引用正确版本的 NuGet 包,尤其是在安装了多个版本的情况下。
  • NuGet 兼容性:验证所有已安装的 NuGet 是否存在与控制台应用程序框架的兼容性问题。
© www.soinside.com 2019 - 2024. All rights reserved.