打包 wsp 时在 Sharepoint 项目中包含第 3 方 dll [英] Include 3rd party dll in the Sharepoint project while packaging the wsp

查看:42
本文介绍了打包 wsp 时在 Sharepoint 项目中包含第 3 方 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的一个项目中,我使用的是来自 Codeplex 的 3rd 方 dll.在我的开发箱中开发代码时,我使用 gacutil 命令将其添加到 GAC 中.

In one of my projects I am using a 3rd party dll which is from Codeplex. While I was developing my code in my development box I had used gacutil command to get it added into GAC.

现在,我需要将项目的 wsp 发送给测试团队,以便在我们的测试盒上进行部署,他们不需要单独的 dll.

Now, I need to send the wsp for the project to teh Test Team for deployment on our Test box and they do not take individual dll.

如何将第三方 dll 与我发送的 wsp 打包在一起,以便将其部署到 GAC 中并由代码使用.

How can I package the third party dll along with the wsp that I am sending so that it gets deployed into GAC and is used by the code.

请告诉我.

推荐答案

你为什么在本地使用 gacutil.exe?

why are you locally using gacutil.exe?

要在您的 SharePoint 项目中包含外部程序集,例如让我们使用 Ninject.dll,您只需将该程序集添加为对您的项目的引用,就像在任何其他 CLR 项目中所做的一样.

To include external assemblies in your SharePoint project, for example lets take the Ninject.dll, you just add the assembly as reference to your project as you would do in any other CLR project.

要确保 Ninject.dll 包含在您的 WSP 中,您必须打开包配置 - 只需打开 SharePoint 项目和 dbl 中的包"节点.单击给定的条目.向下滚动到屏幕末尾并打开高级模式.您可以在那里添加一个用于部署的程序集.只需简单地使用添加程序集 -> 从项目输出添加程序集"操作并选择 Ninject.dll.

To ensure that the Ninject.dll is included in your WSP you have to open the Package Configuration - just open the "Package" node in your SharePoint project and dbl. click the given entry. Scroll down to the end of the screen and open the advanced mode. There you can add an assembly for deployment. Just simply use the "Add Assembly -> Add Assembly from Project Output" Action and select Ninject.dll.

下次打包时,您的自定义程序集将包含在您的 WSP 中.

When packaging the next time your custom assembly will be included in your WSP.

干杯

这篇关于打包 wsp 时在 Sharepoint 项目中包含第 3 方 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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