3

I need to understand the best practice for developing SharePoint solutions for sites that exist already on the production server. I am currently trying to create a visual webpart for a list that exists on the production server. What is the best method for me to debug my web part locally on my development box that references the production list.

2 Answers 2

5

In general, you should avoid directly connecting to PRODUCTION for any sort of development or debugging. Consider bringing the list to your development environment. You can use import/export or consider saving list as template and install the template in Dev environment.

How should you develop, debug and deploy sharepoint solutions?

The serious development projects typically follow SharePoint Application life cycle described at: http://msdn.microsoft.com/en-us/library/gg604045(v=office.14).aspx

The process can be modified slightly based on your need.

6
  • Ok when I said reference I meant similar to what you are saying a version of the list locally to develop against. I like this answer and didn't think of it myself. Lately I have done everything through SharePoint designer but I need more capabilities that can't be done with the designer. Thank you so much ! Jan 28, 2014 at 15:22
  • Will the column names change from production and development Jan 28, 2014 at 15:35
  • It should not change in my opinion. It will be a good idea to check schema using tool like SharePoint Manager. Jan 28, 2014 at 15:41
  • I get this error when trying to use the list template Jan 28, 2014 at 15:46
  • The list "Expense Review" in web "s04068" was created at URL "Lists/Expense Review" instead of at URL "Lists/Expense Task Review". This most likely happened because the URL "Lists/Expense Task Review" is already taken. Jan 28, 2014 at 15:46
3

You can create a quick and dirty copy of the list from the production server by creating a list template from the list settings screen. When you create the list template, you will be given the option to include the content as well. Make sure that is checked.

Download the file from the list template gallery in production, then upload the file to the list template gallery in your Dev environment. Create a new app in Dev and you should see your list template as an option. Creating this list from that template will create the list with the same fields and data as the production site.

A nicety that comes with this is that if you screw up your list in Dev, you can just delete it and create a new copy from the list template and get a fresh copy of your data.

3
  • Thats great but the list has grown over 500mb now.. I did that but with no data. Jan 28, 2014 at 15:54
  • Were you able to recreate your list in your development environment with the template? You can always go back and enter sample data afterwards. Jan 28, 2014 at 19:30
  • Yes I was able to create it. This is strange also if you try to create a list based off a list template with no views SharePoint will error on creation but still create the list with no references to it.. Jan 28, 2014 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.