views:

303

answers:

2

Hi all

I created a utility library for my Sharepoint WebParts. Now when I reference this library from my WebPart project, it compiles fine, but the library is not included in the .wsp package. This means the library assembly is not deployed to the target system, causign the WebPart to fail.

Is there any way to fix this? I am using Visual Studio 08 & VseWSS 1.2.

+3  A: 

Right click of Assembly > Properties
Set “Copy Local” property = true
Build project.
See following for more details:
http://urenjoy.blogspot.com/2009/08/add-assembly-wsp-vsewss.html

Brij
If you want to use the utility assembly also in other web part, you should deploy it as an own solution and feature. Otherwise the utility assembly will be retracted together with you web part assembly although the assembly of another web part might reference it.
Flo
Good point. So should I always make an own feature for the utility library if its used by more than one WebPart?
driAn
+3  A: 

Brij's answer is partially correct, your VSeWSS version is the problem. This feature only came in version 1.3 (I recommend the March CTP) to have the CopyToLocal=true automatically add the assemblies to the GAC for you.

F.Aquino
This is why i like WSPBuilder
Pr0fess0rX