SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I written a program to create site definition in visual studio. I am running below stsadm commandlines in post deployment process. I added below code in the "Post-Deployment command line" window.

stsadm.exe -o deletesite -url http://sp2010
stsadm.exe -o createsite -owneremail  -url http://sp2010 -sitetemplate "STS#0" -title "My Site" 

These lines are not executing. It is giving error with code 4294967294
But if i run these lines in command prompt these are executing successfully. What mistake I done here.

share|improve this question
welcome in the sharepoint world. To diagnose such unobvious issue, split your project into multiple features, that you debug one by one. Only after that, reference the features in your onet.xml. Try to avoid putting things in this files in general, and prefer using feature. Also, you should check in the ULS logs if the exact source of the error is shown – Steve B Sep 25 '12 at 13:42
... Wild guess... Are you running Visual Studio with Run As Admin, right? – SPArchaeologist Sep 25 '12 at 15:35
Yes I am running as administraotr. – Mihir Sep 26 '12 at 4:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.