1 VS 解决方案中的混合签名程序集?
嘿,目前我正在尝试运行一个项目(Noizwaves.Client),它依赖于(作为项目引用)签名的类库(Noizwaves.Core)。 Noizwaves.Core 将其程序集版本设置为 2.0.*。 我在同一个 VS2008 解决方案文件中拥有这两个项目。 Noizwaves.Client 被设置为默认启动项目。
所有项目(和解决方案)在 VS 中构建良好,但是当我运行 Noizwaves.Client 时,出现以下异常:
无法加载文件或程序集 'Noizwaves.Core, Version=2.0.3378.15610, Culture=neutral, PublicKeyToken=bed7327d8103b148 ' 或其依赖项之一。 找到的程序集的清单定义与程序集引用不匹配。 (HRESULT 异常:0x80131040)
当我查看 Noizwaves.Client 的调试目录时,我可以看到 Noizwaves.Core 的版本是 2.0.3378.15613。
我认为 VS2008 中的问题在于项目的构建设置/顺序。 目前所有设置均设为默认值。
有人能解决这个问题吗? 谢谢!
Hey, currently I am trying to run a project (Noizwaves.Client) which has a dependency (as a project reference) to a signed class library (Noizwaves.Core). Noizwaves.Core has it's assembly version set to 2.0.*. I have both of these projects within the same VS2008 solution file. Noizwaves.Client is set as the default startup project.
All projects (and the solution) build fine in VS, but when I run Noizwaves.Client, I get this following exception:
Could not load file or assembly 'Noizwaves.Core, Version=2.0.3378.15610, Culture=neutral, PublicKeyToken=bed7327d8103b148' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
When i look in the debug directory for Noizwaves.Client, I can see the version of Noizwaves.Core is 2.0.3378.15613.
I think the build settings/order of the projects is to blame in VS2008. Currently the settings are all set to default.
Does anyone have a fix to this problem? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Noizwaves.Client 可能正在从不同位置加载 Noizwaves.Core。
Noizwaves.Core 在 GAC 中吗? 在 Visual Studio 下的某个文件夹中(例如 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies)
如果这没有帮助,您可以尝试以下操作:
像这样设置注册表(注意:我建议您制作一个副本原始值,以便您可以恢复到原始状态):
并创建一个文件夹 C:/Temp/FusionLog。
Fusion 是 .NET 框架的一部分,负责查找/加载程序集。
进行此更改后,您将在该文件夹中找到所有 .NET 应用程序的一堆日志文件。
Noizwaves.Client is possibly loading Noizwaves.Core from different location.
Is Noizwaves.Core in GAC ? In some folder under Visual Studio (e.g C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies)
If that doensn't help you could try the following:
Setup registry like this (note: I suggest you make a copy of original values so you can revert to original state):
And create a folder C:/Temp/FusionLog.
Fusion is part of .NET framework that is responsible for finding/loading assemblies.
After this change you will find a bunch of log files in that folder for all .NET apps.
Client项目对Core DLL有什么样的参考? 是文件参考还是项目参考? 尝试删除引用并将其重新添加为项目引用。
What kind of reference does the Client project have on the Core DLL? Is it a file reference, or a project reference? Try removing the reference and re-adding it as a project reference.