Question

I have created an event receiver inside Visual Studio 2012. now i want to generate a .wsp file representing my solution to be deployed inside our live server. now i navigate to the following location inside my visual studio project

..\Documents\visual studio 2012\Projects\CustomerSitesER\CustomerSitesER\bin\Debug

and i found a .wsp file with the same name as my current solution. so i was planning to copy this file to our live server and do the deployment using (stsadm.exe -o addsolution & stsadm.exe -o deploysolution)... but i have noted that when i modify the feature elements.xml file inside VS 2012 , and i build the project the above .wsp modified date did not get changed,,, so not sure if simple copy this .wsp to live and do the deployment will it include the modified elements.xml file? so can anyone adivce what is the best way to deploy a .wsp file from Dev to live environments?

Was it helpful?

Solution

First off, a SharePoint solution package file is actually a cab file with a .wsp extension. If you switch the extension to .cab, you can open the file and extract the contents so you can examine if the feature.xml is what you think it should be.

Second, the debug .wsp will not change if you are compiling/rebuilding the solution in release mode/configuration. In this case, the .wsp file in the \bin\Release folder will be updated not the one in Debug.

Typically, it is the Release version that is taken and deployed to production in the way you describe.

My last thought is that you should deploy your solution to a staging environment first in order to ensure it actually works as you expect. This is best practice. If you don't have a staging environment, then you should clear dev of all the pieces that the package delivers and deploy the solution as if you had never done it before to ensure it is actually ready for production.

OTHER TIPS

The above answer is correct or you can have another option as-

Delete the .WSP files from the \bin\Debug folder and rebuild the solution. You can find the current/updated date to the WSP.

Or You can have the another option as above, Just => Right Click on the Solution and => Select Publish option and give the path as per you need.

You can find the latest WSP in the above mentioned path with the latest/updated date with the latest files in the solution.

Hope this will help you!

  • Delete the old .wsp file from \bin\debug\.
  • Rebuild and Publish the solution
  • You will get latest WSP file.

When you "Build" your SharePoint project only the DLL file gets updated. To get the WSP file you have to Publish the project from Visual Studio. Right-click the project and select Publish.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top