简体   繁体   English

将库从2.0迁移到3.5会中断引用的应用程序

[英]Migrate a library from 2.0 to 3.5 breaks app that references

SharePoint app references a library that has always been on 2.0, recently upgraded to 3.5. SharePoint应用程序引用的库始终为2.0,最近已升级为3.5。 Upon upgrading and updating the referencing application I get a "Could not load assembly, an attempt was made to load a program with an incorrect format". 在升级和更新引用应用程序后,我得到“无法加载程序集,试图加载格式不正确的程序”。

How do I resolve this? 我该如何解决?

I thought this was an issue with target cpu, but the component is now targeting "Any cpu" and the issue persists. 我以为这是目标cpu的问题,但是该组件现在的目标是“任何cpu”,问题仍然存在。

When you bring up the assembly info in Visual Studio, there is an Assembly version, and a File version. 在Visual Studio中显示程序集信息时,有一个程序集版本和一个文件版本。 If you change the Assembly version, pages referencing the library will break, if you change the File version, it won't, or at least it hasn't for me so far. 如果更改程序集版本,则引用该库的页面将中断,如果更改文件版本,则不会,或者至少到目前为止对我而言还没有。

Can I assume the SharePoint server has the 3.5 framework installed as well? 我可以假定SharePoint服务器也安装了3.5框架吗? Is this assembly in the GAC? 该大会在GAC中吗? It could be that the strong name changed and you need to retract and redeploy the solution containing the assembly. 可能是强名更改了,您需要撤回并重新部署包含程序集的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM