2014-09-23

When we deploy a WSP solution using Visual Studio onto a development Farm server it is always deployed to one Web Application that is mapped to the Solution.

However, when we create a package and try to deploy to a Testing or Production server it is always deployed globally.

After Lots of search I found  stackexchange and this link.

  1. Double click the package.
  2. Open the Manifest.
  3. Edit the Option.

Add data as follows:

<Solution xmlns="http://schemas.microsoft.com/sharepoint/">

 <Assemblies>  
  <Assembly Location="SharePointProject1.dll" DeploymentTarget="GlobalAssemblyCache">    
   <SafeControls>      
   <SafeControl Assembly="[Assembly Name]" Namespace="[Namespace]" TypeName="*" Safe="True" />
   </SafeControls>  
  </Assembly>
 </Assemblies>
</Solution>

Every thing is fine, but what we need to put Assembly=”[Assembly Name]” ??

It will be better to put anything, you just place like this: 

<Assembly Location="SPApprovalSolution.dll" DeploymentTarget="GlobalAssemblyCache">
<SafeControls>
<SafeControl Assembly="$SharePoint.Project.AssemblyFullName$" Namespace="SPApprovalSolution" TypeName="*" Safe="True" />
</SafeControls>
</Assembly>

$SharePoint.Project.AssemblyFullName$ :- This will automatically create assembly Information for you.

About the author 

Ajeet Kumar Singh