Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint development in visual studio without having to deploy/debug on every code changes

I'm using VS2010 connected to a local SP2010 installation, I edit the code in VS2010 (i.e. of a WebPart) and then in order to see the result on a browser I deploy the solution.

This is very annoying since it is a big project and it takes a couple of mins to deploy the solution.

I was wondering if it is possible to have the "edit -> save -> F5" approach even for SharePoint.

Thanks!

like image 960
steax Avatar asked Mar 09 '26 14:03

steax


1 Answers

I'm gonna to integrate here the answer i get from the kind ppl and what i've actually done to solve/mitigate my slowness problem:

  • Installed CKSDev Visual Studio plugin from here: http://cksdev.codeplex.com/
  • On the SharePoint project properties tab set to 'True' the property 'Auto copy to SharePoint root', with that on each time you do save a 'visual' (ascx, aspx, js, css, ..) source file, it will be automatically copied over the SP hive without having to manually push it using the Quick Depl. option project properties
  • On SharePoint project properties page (right-click, properties), add the following post build event command line:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\gacutil.exe" /i "$(TargetPath)"

iisreset

The previous commands will:

  1. Install the project dlls into the GAC
  2. Restart IIS in order to catch the new dlls

Now each time you do save a change in the visual or build the code it will automatically pushed to the SP installation.

For newer source files i still need to normally deploy the project.

like image 108
steax Avatar answered Mar 11 '26 04:03

steax



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!