We do not want to manually copy all the dependent assemblies to GAC by ourselves. How to copy the assemblies to the GAC with the deployment itself?
The trick is to add the reference in thePackage.package file to tell the SharePoint to copy the assemblies also to the GAC. Just edit the Package.package file in a notepad or any xml editor and add the reference just like below.
Things to Note:
- All the assemblies to be copied to GAC needs to be signed with a strong key.
- The "sourcepath" value is the relative path of the location of the referenced assembly
- "SafeControl" entry may be needed based on how the control is being used. (mostly needed to be used as any UI control)
No comments:
Post a Comment