gpt4 book ai didi

.net - 为什么.NET 试图加载一个不存在的程序集?

转载 作者:行者123 更新时间:2023-12-01 12:45:17 30 4
gpt4 key购买 nike

<分区>

尝试在引用的程序集中执行函数时出现这个奇怪的错误。我有程序集的源代码,但没有名为“XmlSerializers”的命名空间,所以我无法理解为什么它会尝试加载“Netaccounts.Ola.RestClient.XmlSerializers”

谁能建议从哪里开始解决这个问题?我认为 .Net 框架或 visual studio 有问题,因为这对我来说毫无意义。

它发生在这条线上

XmlSerializer serializer = new XmlSerializer(type);

但 XmlSerializer 来自 System.Xml.Serialization。我什至重写了代码,但没有效果。我得到了同样的错误。

System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(type);

干杯!

BindingFailure occurred
Message: Managed Debugging Assistant 'BindingFailure' has detected a problem in 'D:\Local Dev Projects\Projects\WRJ Studio\WRE Quote Builder\bin\Debug\WRJ Studio.vshost.exe'.
Additional information: The assembly with display name 'Netaccounts.Ola.RestClient.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Netaccounts.Ola.RestClient.XmlSerializers, Version=1.0.5101.5654, Culture=neutral, PublicKeyToken=1809573d4ad081b2' or one of its dependencies. The system cannot find the file specified.

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com