错误:程序集清单定义与 Analysis Services 自定义脚本中的程序集引用不匹配

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

目前,我在 Analysis Services 中制作的自定义脚本在执行时出现以下错误:

Version=7.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' : Assembly manifest definition does not match assembly reference. (Exception in HRESULT: 0x80131040)
,在我的程序的下一部分中给了我这个例外
in ScriptMain.CreateNewOutputRows() en UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers, OutputNameMap OutputMap) en Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
,另一方面,代码的所有逻辑都很好,最后,在引用部分有对 System. Text.Json 的版本为 8.0.0.0,并且在 GAC 中,DLL 库已正确添加到相应的版本中,问题出在 DtsDebugHost.exe.config 文件中,因为它具有以下引用
<dependentAssembly> <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="7.0.0.3"/> <codeBase version = "7.0.0.3" href = "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\..\..\MSBuild\Current\Bin\System.Text.Json.dll" /> </dependentAssembly>
,因此,当我手动编辑此文件并将其设置为8.0.0.0,然后重新编译解决方案,此文件会自动修改并再次恢复对库版本7.0.0.3的引用。

我尝试了之前提到的方法,但没有成功。

sql-server ssis
1个回答
0
投票

只需重新安装集成服务,DtsDebugHost.exe.config 文件中的引用就正确了!

© www.soinside.com 2019 - 2024. All rights reserved.