0
votes

I'm using MS P&P Guidance Library for SharePoint 2010 in my custom solutions. Currently each solution builds wsp with including Microsoft.Practices.SharePoint.Common.dll and Microsoft.Practices.ServiceLocation.dll and when wsp is deploying it installs these assemblies to GAC, but when it is retracting it removes them. So I get a situations, when I deployed two wsp from two solutions, and then if I remove one of them I get second not workable, because it can't load Guidance Library assemblies.

Please tell me about best practices how to deploy P&P Guidance Library to farm separately from custom wsp's? And how to check in custom solution is there available needed assemblies in farm?

Currently I see two approach. 1. Install assemblies manually through cmd or PowerShell. It's not good because in this case I need to do it on each WFE. 2. Make custom wsp, which will deploy assemblies to GAC and activate some farm level feature, which will inform that assemblies have installed. And then custom solution must check this farm feature before activate it own features.

Thanks in advance for your advices!

1

1 Answers

0
votes

I would advise you to have a separate WSP containing these two assemblies. This WSP must be installed first and treated as a prerequisite for any other WSP to work.

Your solution structure in VS needs to be changed for this. Create a separate project for P&P and let all other projects refer this project. But make sure that other projects do not copy the referred DLL's into the output folder. You can set this by setting Copy Local to false on the reference.