为什么打包我的 Sharepoint 2010 项目会破坏我的引用?
我遇到一个非常令人沮丧的问题,我的 SP2010 项目在 VS2010 中,当我构建/重建解决方案时,一切似乎都完全正常,但是当我转到“打包”SP2010 项目时,尽管它构建并部署成功,但其中之一依赖程序集丢失了对解决方案中不同项目的引用之一 - 这也会导致运行时错误。
有谁知道在 SP2010 项目上选择“部署/打包”时发生的任何其他构建步骤,或者任何其他可能导致此停止工作的情况?
只是困惑为什么构建/重建不会导致问题(在调试和发布配置中),但打包/部署会中断......
例如:
构建解决方案(没有问题)
打包/部署后
I'm having a very frustrating issue where my SP2010 project in VS2010 where everything seems to be perfectly normal when I build/rebuild the solution, but when I go to "Package" the SP2010 project, though it builds and deploys successfully, one of the dependent assemblies loses one of its references to a different project in the solution - which also causes a run-time error.
Does anyone know of any additional build steps that occur when selecting Deploy/Package on a SP2010 project, or anything else that could be causing this to stop working?
Just confused as to why a build/rebuild causes no issues (in both Debug and Release configurations), but a Package/Deploy breaks...
For example:
Solution built (no problems)
After Package/Deploy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在项目中使用第三方程序集或项目引用,那么您需要将它们显式添加到包中。请参阅此链接了解更多详细信息。
May be in your case if you are using a Third Party assembly or a Project reference in the project then you need to explictly add them to the Package. Please refer this link for more details.
您可以尝试此操作(它刚刚解决了类似问题)来解决部署中的引用问题:
在 Visual Studio 中编辑 .package 文件,然后在“高级”选项卡下编辑每个附加程序集引用。确保该程序集在“源项目”组合框中仅出现一次。否则,尝试更改所选行。
有时打包者只是丢失了引用......
You may try this (it has just worked for similar problem) to solve the reference problem in deployment :
Edit your .package file in Visual Studio and, under the "advanced" tab, Edit each additional assembly reference. Ensure there is only one occurrence of the assembly in the "source project" combo box. Else, try to change the selected line.
Sometimes the packager just loses references...