سؤال

Problem: Multiple solutions using shared dll's can cause havoc when individual solutions are retracted.

Example: You have a web part helper dll used by all your web part code. If you retract a solution containing a reference to this dll then the SafeControl entry is removed from the appropriate web application and all your web parts start to fail. Or even better, the dll is removed from the GAC altogether.

Solution: I don't know? You tell me.

هل كانت مفيدة؟

المحلول

When you have common/shared components, like the helper DLL you talk about, that get used across multiple solutions within you organization. My recommendation is to package these up as a 'framework solution' that is deployed to the servers indendently of the 'feature based solutions'.

This way you 'feature solutions' are developed in the knowledge that the 'framework' is always available.

SharePoint always will retract/remove what you added in a solution package, unforunately it does not have anything built in to detect shared components.

نصائح أخرى

The method I use is to merge all assemblies into one using ILMerge as part of the build, before packaging

This make its bulletproof as then its impossible for someone to somehow remove dependant assemblies.

Yes, That's a common issue in SharePoint deployment. My Solution is to change the version number for helper dll-s. So even you have multiple helper dll-s in GAC that should not be a big issue. Tip:SolutionInfo

We assign each shared Assembly to a single WSP file. We then use feature dependencies to describe whether any one is using the shared component and have the rule that shared dependencies cannot be uninstalled if any active features depend on it.

The difficulty is in convincing everyone to follow the rules.

Teams tend to copy and paste Assemblies into their own WSP files or uninstall any WSP files they deploy without paying attention to the rules.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top