Tuesday, 23 September 2014

How to deploy wsp to single web application : Visual Studio

When we deploy wsp solution using Visual Studio on development Farm server, It always deployed on one web application that is mapped with solution.

But when we create a package and try to deploy on testing or Production server it always deployed globally.

After Lots of search I found  stackexchange and this link.

Both are showing the same solution as follows:

1-  Double click the package.
2- Open the Manifest.
3- Edit the Option.
4- Add Dummy data as follows:

 <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.

No comments :

Post a Comment