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.

2 comments :

  1. this is giving me error in my SP 2013 , VS 2013 SOLUTION:
    PLEASE HELP, HOW TO FIX THIS :
    Error 1 Error occurred in deployment step 'Add Solution': Error: Cannot find this file specified in the manifest file: SharePointProject1.dll

    ReplyDelete
  2. In the project properties, make sure "Include Assembly in Package" is set to True.

    ReplyDelete