This article i hope will help many starters as well as experienced SharePoint developers to understand the way SharePoint uses the dll deployed in its site directory bin folder which is located under the inetpub/virtual directory folder. As we all know and have used mostly (atleast in our case) deployment of dll (Custom WebPart, Custom control etc) in GAC (Global Assembly Cache) was the way to develop SharePoint solutions. But there is another very good approach which is mentioned below in steps. That is to deploy the dll directly to the site bin folder. Here are the steps to accomplish:
Read More…
1. Set Output path of the projects (Project in which you are keeping webpart control classes) to the site bin folder. You can find the path by navigating to C:\Inetpub\wwwroot\virtual directory\port number\bin
2. Build the solution and make sure it is compiling successfully.
3. Add a safe control entry to the web config file. Do not mention public key token. Do not strong name the project.
4. That's it, your code is deployed in the site's bin directory and its information is located in the config file. Go Ahead and populate the web part gallery with the web part and add it to a page.
Advantages:
1. Biggest advantage is the fact that you do not have to reset iis after every compilation of code.
2. You can directly copy the dll from the other bin folders to this as and when required.
DisAdvantage
1. As you are deploying code to the bin folder of particular site, it will not be available globally. That means you will need to add the dll to every site's bin folder.
I hope this article will clear most of your doubts. In case something is not understood, do write a comment to this post or email us at sharepointkings@gmail.com









