How to upgrade a Visual Studio SharePoint 2010 Branding project

The assumption is that you deployed your branding solution as .wsp file and you now wanted to make further changes such as the master page, page layout, CSS, images etc..
How do you go about the upgrade and deployment process:

  1. Open your existing branding solution using Visual Studio 2010 or latest version
  2.  Make the appropriate code changes
  3. Save your project and later, right click your solution and  “Rebuild”
  4. Right click your solution and click “Package”
  5. Right click your solution and click “Open Folder in Windows Explorer”
  6. Click the bin folder
  7. Click Debug folder
  8. Make sure your .dll, .pdb and .wsp files’ modified date is todays date to reflect that you indeed have rebuilt the project
  9. Make a copy of the wsp file, rename it such as by giving a version number
  10. Since this is a Sandboxed solution, to deploy click Site Actions -> Site Settings -> Solutions (i.e. under Galleries)
  11. From Solutions page, click the Solutioms ribon and later Upload Soltuion icon.
  12. Upload the renamed .wsp file and in the Solution Gallery – Upgrade Soltuion dial box click the Upgrade icon
  13. As you can see your new .wsp file is activated while the previous .wsp file is deactivated

That is it.

Advertisements

How to shrink SQL server 2008 R2 database in a dev environment

I am writing this tips as a note to myself.

As a SharePoint developer I run my SharePoint 2010 development inside a VM. As times goes by I found myself short of hard disk spaces. Following these steps helped to alleviate the problem:

  1. Open up your SQL database where SharePoint is installed
  2. Find the database where its log file is taking up lots of space, in most situations it would be Sharepoint_Config.
  3. Right click the database -> Properties -> options and now change recovery mode from full to simple
  4. Right click database again -> Tasks -> shrink -> database then click Ok. This will shrink the SharePoint_Config_log.ldf file
  5. Finally change the recovery mode to full by following a similar step as #3

Please do not use this technique in prod environment as you normally would require to have a normal database backup process.