如何安装具有相关程序集的WSP? [英] How to install a WSP that has dependant assemblies?

查看:82
本文介绍了如何安装具有相关程序集的WSP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中有一个由3个项目组成的解决方案.

I have a solution in Visual Studio 2010 that is made up of 3 projects.

我有一个用于SharePoint 2010自定义计时器作业的项目,一个由我的自定义计时器作业使用的项目(项目A),以及由项目A使用的另一个项目(项目B).

I have one project for my SharePoint 2010 custom timer job, one project (Project A) that is used by my custom timer job, and another project (Project B) that is used by Project A.

问题在于,当我打包项目时,WSP仅将自定义计时器作业"安装到GAC.是否有某种方式也可以安装所有依赖的DLL?

The problem is that when I package my project the WSP only installs the Custom Timer Job to the GAC. Is there some way to have all dependant DLLs installed as well?

推荐答案

您必须将这些DLL(项目引用)手动添加到WSP项目的清单中. Visual Studio中有一个UI可以为您提供帮助,而无需直接修改XML.

You have to add those DLLs (project references) manually into the WSP project's manifest. There's a UI in Visual Studio to assist you with this, no need to modify the XML directly.

步骤:

  1. 在WSP项目内的解决方案资源管理器中,找到Package文件夹.
  2. 双击Package.package文件以打开程序包设计器.
  3. 在屏幕底部,单击高级";将打开一个显示其他组件"的屏幕.
  4. 单击添加",然后选择从项目输出添加装配".
  5. 选择组装和部署模式(GAC或WebApplication = bin文件夹).
  1. In Solution Explorer within your WSP project locate the Package folder.
  2. Double-click on Package.package file to open the package designer.
  3. In the bottom of the screen click on 'Advanced'; a screen showing 'Additional Assemblies' will open.
  4. Click on 'Add' and select 'Add assembly from Project Output'.
  5. Choose the assembly and deployment mode (GAC or WebApplication = bin folder).

在此对话框中,您还可以注册相关的安全控件和资源.另外,通过添加现有程序集",您可以添加仅以二进制形式可用的程序集(即,在源代码中不作为VS项目提供).

In this dialog you can also register the associated safe controls and resources. Also, via 'Add Existing Assembly' you can add assemblies available in binary form only (i.e. not available as VS projects in source code).

这篇关于如何安装具有相关程序集的WSP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆