Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
842 views
in Technique[技术] by (71.8m points)

visual studio 2010 - Include 3rd party dll in the Sharepoint project while packaging the wsp

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.

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.

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.

Please let me know.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

why are you locally using gacutil.exe?

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.

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.

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

Cheers


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...