In one of my previous blogs I have mentioned that there is a serious problem if you want to develop SharePoint 2007 solutions using Visual Studio 2008: SharePoint Solution Generator (SSG) doesn't work on such an environment. Personally I use SSG quite a lot while working with custom lists: I can configure the list using the SharePoint GUI and then extract its definition and incorporate it in my Solution.
To solve this problem I have created a custom StsAdm command which is an equivalent of the SharePoint Solution Generator.
The command allows you to extract the schema and the forms of a particular list. As I've been busy lately I didn't manage to fix the issue I have found in SSG and described previously as well. As soon as I will though, there will come an update of the StsAdm command. In the meanwhile you can download the OCDExportList StsAdm from our CodePlex site: Imtech StsAdm Commands v1.0.0.0. The command is packaged as a WSP. It becomes available after deploying the Solution.
And if you wonder what OCD in the name means: it stands for OneClickDeployment – a powerful utility I have helped designing and developing and which supports our development process of SharePoint 2007 Solutions. More about it soon.
The OCDExportList command is free and you can use it without any restrictions. If you want to use it, I would appreciate it if you left a comment and send me some feedback.

















May 26th, 2008 at 11:27 am
HI,
Can find the instructions how to use this.
May 26th, 2008 at 3:54 pm
The short help shows after having typed stsadm -o ocdexportlist
October 10th, 2008 at 11:34 am
I've definitely found the 'ocdexportlist' useful. After realizing the SharePoint Solution Generator 2008 wasn't going to cut it (took me a few hours), I used your custom stsadm command to extract the list definition and copied those files to my List Definition project in VS 2008. With a couple of tweaks (setting the "Start Browser With Url" in the property page and setting the type attributes in my xml files to a unique value) I was able to deploy and activate as a feature. Thanks! I didn't realize how much pain it was going to be with VS 2008 using MS' tool.
October 11th, 2008 at 2:08 pm
You're welcome
Great to hear I could help you.
January 9th, 2009 at 12:49 pm
Hi…thanks for such an nice tool..is there any way to generate the scheme with the content of the list with using ocdexportlist operation
January 9th, 2009 at 2:32 pm
@sudhir rawat: thanks sudhir. Unfortunately it is not possible to export the content together with the List Definition using the ocdexportlist operation
January 9th, 2009 at 2:48 pm
Thanks Waldek for such an quick reply…. Is there any other tool available will help in generating the schema with data.
January 13th, 2009 at 7:33 am
Hi Waldek,
I am facing problem in creating the Document Library from the schema.xml created by OCDEXPORTLIST. The document lbrary is creating by the default view is not creating and some link of document library is not working either, Is there any special changes or anything else needs to be done in schema.xml for creating the Document library.
Thanks & Regards,
Sudhir Rawat
January 13th, 2009 at 7:50 am
@sudhir rawat: personally I haven't run into any issues, but maybe this post will give you something to start off with: http://msmvps.com/blogs/laflour/archive/2008/05/14/export-list-definition-with-ocdexportlist-and-reusing-standard-views.aspx
January 13th, 2009 at 2:02 pm
While I use ocdexportlist command to extract the List definition it extracts AllItems.aspx, DispForm.aspx, EditForm.aspx, NewForm.aspx along with schema.xml. But in case of Document Library it extracts only Schema.xml.
Is there some other way for document library?
January 13th, 2009 at 3:00 pm
@sudhir rawat: not that I know of. In general I use the tool to generate List Definition for custom lists rather than Document Libraries. The tool works the same as the SharePoint Solution Generator (SSG): have you tried whether it is possible to create a valid List Definition for your Document Library using SSG? If not there might be something wrong with your list.
March 17th, 2009 at 3:46 pm
Hi Waldek,
I\'m trying to use this tool but am getting the folowing error:
The remote server returned an error: (401) Unauthorized
I\'m running it as administrator and have rights to the web and list. I\'ve tried it on a couple of sites and get the same error. Do you have any idea what might cause this or how I could diagnose the root problem? What credentials are used to call the commands in your code?
Thanks,
James
March 17th, 2009 at 5:59 pm
@James: by default the command uses the same credentials as the user who runs the command. I assume you know that it works with local sites only (located on the same machine as where the command is being run)?
March 17th, 2009 at 6:01 pm
Yes – I've tried it on 2 different MOSS servers here with the same result? Does it write errors to a log anywhere?
March 17th, 2009 at 6:07 pm
@James: unfortunately it doesn't log anything. I've never experienced any errors with (running on a VPC under the admin account), hence the lack of logging. You could give a try running the SharePoint Solution Generator of VSeWSS. Perhaps the newest version would be the answer to your problems.
March 17th, 2009 at 6:10 pm
I've tried VSEWSS 1.2 SSG and I get an error saying can't find site (even though it lets me choose a list from the site I choose!). When you say "latest version" are you referring to 1..2 or 1.3?
I guess I've got an issue with my configuration somewhere. I'm using SPM to get list stuff now – hopefully that will give me all that I need.
March 17th, 2009 at 11:35 pm
I meant 1.3. I've heard that there has been some serious work around it. I haven't tried it myself so I cannot tell how much it exactly is improved, but I think you should really give it a try.
March 23rd, 2009 at 11:29 pm
Great work mate!
Cheers
March 24th, 2009 at 8:06 am
@Tobias Zimmergren: Thanks dude! Utz!
April 10th, 2009 at 3:00 pm
Having the same problem as James (401 Unauthorized), and the same problem he's having with SSG (can't find site). I found the problem happens on a site with host headers and an entry in windows\system32\drivers\etc\hosts. I don't have either problem on a site set up on an arbitrary port (i.e. http://win2003r2wss:9000).
June 12th, 2009 at 12:13 pm
Russ, that\'s probably due to the installation of sp1:
This kb should help you (http://support.microsoft.com/kb/896861)
Only option 2 (disabling the loopback) should do the trick
BTW, really hard to read the security code. Guess they got better eyes in Holland.
June 25th, 2009 at 10:36 am
Hi waldek,
I used you tool for discussion list, it work fine for me. But when i try to add to the list created by definition through a webpart. It give me an error \"Value does not fall within the expected range.\" on the line \"SPUtility.CreateNewDiscussion(list.Items, \"new test\");\". I m not sure what is the problem. I tried using VSEWSS 1.3 SSG. But i get the same error.
kindly help
June 29th, 2009 at 4:50 pm
@shashi: as I haven't worked that much with VSEWSS 1.3 I'm afraid I cannot provide you with any more information. I suggest you try to post your question to SharePoint forums @ MSDN and maybe one of the guys responsible for VSEWSS will be able to help you.
September 4th, 2009 at 10:08 pm
Shashi, Here's a post detailing another possible cause/solution to the "Value does not fall within the expected range." error. Hope it help.
http://foxsys.blogspot.com/2009/09/value-does-not-fall-within-expected.html
September 29th, 2009 at 5:42 pm
Are there installation instructions posted somwwhere?
October 1st, 2009 at 7:08 am
@Chris Crossen: there is no installation manual, but as the custom STSADM commands are wrapped in a WSP, all you have to do is to deploy it to your farm – just as you would with any other WSP.
February 12th, 2010 at 8:23 pm
Can you assist me by pointing me to a location that contains command line arguments for the SSG?
February 13th, 2010 at 8:30 pm
@Jeannie: actually I haven't used the SSG as a command line tool, so I'm not sure if there are any command line arguments for it.
March 2nd, 2010 at 11:05 am
Any plans on releasing a recompiled version for SP2010?
March 2nd, 2010 at 5:04 pm
@Asbjorn: No, not really. In 2010 you can achieve the same by saving the site as template, and then importing the WSP into Visual Studio using the new Visual Studio 2010 SharePoint Developer Tools.
March 31st, 2010 at 9:59 pm
Where is the source code? I found the project on codeplex. I checked the tab for source code, and it says there are no change sets. There is a downloadable zip for a DeploymentSteps project, but it looks like the wrong source code?
Thanks for any help.
April 1st, 2010 at 6:14 am
@Perry: the Imtech project contains many different tools. Not all of them ship with source code. Why would you like to have the source code if I may ask?
June 23rd, 2010 at 7:07 pm
There is no setup file for OCDExportList(http://imtech.codeplex.com/releases/view/10875). So could you please tell me how to setup OCDExportList(WSP) on sharepoint machine?
June 24th, 2010 at 6:08 am
@Riccky: same as you would with any other WSP. First you run stsadm -o addsolution in the Command Prompt and then in the Central Administration deploy the Solution.