mercredi 25 mars 2015

How to encapsulate code in SharePoint 2010 and make it accessible across multiple solutions

Anyone know the best way to reference functions in a solution to be used for any/all other solutions (web parts, application pages, timer jobs, etc)?

I have several small modules of code that I've copied to multiple solutions that I'd prefer to maintain in one solution that can be called from other solutions.

I don't know the best way to do this.

Please provide step-by-step instructions or a link that has that.


What I've discovered so far...

Option 1: I found instructions on how to Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010, but I've been told that's not the most efficient way to reference functions in another solution and that there's a performance hit for that.

Option 2: I also found instructions on Working with Assemblies in the GAC, but I don't know if that's the most efficient way to do this either.

I know Option 1 works. I've tried it. I like this option because I ONLY have to redeploy the web service after making updates to it, not the calling solutions. I just don't think it's the most efficient method.

0 commentaires:

Enregistrer un commentaire