0

We are migrating moss 2007 site to SharePoint 2010. I am faced with a challenge with manual migrating a custom webpart from Moss 2007 to SharePoint 2010. When i open the webpart created in visual studio 2005 in 2010 and try to build the solution. I get this error

"The command ""c:\program files\Common Files\Microsoft Shared\web server extensions\14\bin\stsadm.exe" -o execadmsvcjobs" exited with code 3."

Any guidence on how to tackle it?

Update - Here is the data in the Project.default.target file

<PropertyGroup>
<PackageFile>name.wsp</PackageFile>
<TargetUrl>http://localhost</TargetUrl>
<ProjectDeploymentFilesFolder>DeploymentFiles</ProjectDeploymentFilesFolder>
<ProjectRootFilesFolder>RootFiles</ProjectRootFilesFolder>
<WssRootFilesFolder>"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14"</WssRootFilesFolder>


<!-- Modified 3/25/08 RHoward - tokenized system directory -->
<MAKECAB>"C:\WINDOWS\system32\makecab.exe"</MAKECAB>
<!-- End of 3/25/08 Modification -->
<STSADM>"c:\program files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe"</STSADM>

<STSADM>"$(ProgramFiles)\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe"</STSADM>
<STSDEV>"C:\GDT_Tools\STSDev\stsdev.exe"</STSDEV>

<!-- Added 3/25/08 RHoward - Surrounded TargetName and SolutionDir with quotes to support spaces there -->
<REFRESH>$(STSDEV) /refresh "$(TargetName)" "$(SolutionDir)"</REFRESH>
<!-- End of 3/25/08 Add -->
<GACUTIL>"C:\Program Files(x86)\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"</GACUTIL>
<ISSAPP_SCRIPT>CSCRIPT.EXE C:\WINDOWS\system32\iisapp.vbs</ISSAPP_SCRIPT>

2 Answers 2

1

You run a x64 bit system (SharePoint 2010) so stsadm.exe is not located here

"C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\14\bin\stsadm.exe"

Update Microsoft.SharePoint.targets file to

"$(ProgramFiles)\Common Files\Microsoft Shared\web server extensions\14\bin\stsadm.exe"

Close the solution and re-open it.

Hope this helps!!

2
  • im a bit confused where you bought in the x86? i know its the same as the link i posted but spStacker stsadm is not referencing x86 like the file path your suggesting and the same as my link ;) , "error file not found" meaning he needs to find the file that is being reference and see if it exists, plus yes should be on x64 and 2005 should be targeting x64, his path indicates its x64 not x86
    – Ali Jafer
    Commented Oct 13, 2012 at 22:34
  • He was migrating from MOSS 2007 so there is possibility that the earlier solution built on x86 and the file may refer to the path with x86 directory. I have assumed on that basis only, haven't visited your link yet but will do now ;) I knew it because same kind of thing happened to me. Commented Oct 22, 2012 at 13:37
1

Look at this i think its the same issue :)

http://stsdev.codeplex.com/discussions/27623

asking the question in that area would get a better reponse too!

also

http://social.msdn.microsoft.com/Forums/en/csharplanguage/thread/6b4753db-76d9-442a-9c35-8cc3a87f71bf

from the above link the error indicates

"error file not found"

hope it helps :)

EDIT

can you change the code slightly to this?

<WssRootFilesFolder>$(ProgramFiles)\Common Files\Microsoft Shared\web server extensions\14</WssRootFilesFolder>

also make sure that:

c:\program files\Common Files\Microsoft Shared\web server extensions\14\bin\stsadm.exe

(stsadm.exe) exsist at that location?

If not then change that also to the location it should exsist, so it should look like this:

<PropertyGroup>     
<PackageFile>name.wsp</PackageFile>     
<TargetUrl>http://localhost</TargetUrl>     
<ProjectDeploymentFilesFolder>DeploymentFiles</ProjectDeploymentFilesFolder>     
<ProjectRootFilesFolder>RootFiles</ProjectRootFilesFolder>     
<WssRootFilesFolder>"$(ProgramFiles)\Common Files\Microsoft Shared\Web Server Extensions\14"</WssRootFilesFolder>     


<!-- Modified 3/25/08 RHoward - tokenized system directory -->     
<MAKECAB>"C:\WINDOWS\system32\makecab.exe"</MAKECAB>     
<!-- End of 3/25/08 Modification -->     
<STSADM>"$(ProgramFiles)\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe"</STSADM>     

<STSADM>"$(ProgramFiles)\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe"</STSADM>     
<STSDEV>"C:\GDT_Tools\STSDev\stsdev.exe"</STSDEV>     

<!-- Added 3/25/08 RHoward - Surrounded TargetName and SolutionDir with quotes to support spaces there -->     
<REFRESH>$(STSDEV) /refresh "$(TargetName)" "$(SolutionDir)"</REFRESH>     
<!-- End of 3/25/08 Add -->     
<GACUTIL>"C:\Program Files(x86)\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"</GACUTIL>     
<ISSAPP_SCRIPT>CSCRIPT.EXE C:\WINDOWS\system32\iisapp.vbs</ISSAPP_SCRIPT> 

hope it helps :)

6
  • Hi thanks for the answer - i tried is but still having the same error. any more suggestions? i habe updated the question
    – SandeshR
    Commented Oct 13, 2012 at 22:52
  • iv ammended the answer
    – Ali Jafer
    Commented Oct 13, 2012 at 23:32
  • Hi Thanks for the answer update, after making the changes- am getting a different exist code error "The command ""c:\program files\Common Files\Microsoft Shared\web server extensions\14\bin\stsadm.exe" -o execadmsvcjobs" exited with code -1". two things i have noticed are not there in the mentioned links 1) gacutil inside "C:\Program Files(x86)\Microsoft SDKs\Windows\v6.0A\bin\" and stsdev.exe inside the link C:\GDT_Tools\STSDev\
    – SandeshR
    Commented Oct 14, 2012 at 0:12
  • ahh ok you need to find the correct locations on the server where they are and change the links to the correct location!
    – Ali Jafer
    Commented Oct 14, 2012 at 0:32
  • Hi - i have correected the gacutil path but the stsdev is no where to be found in the machine - seems like it is used for deployment in 2007..any suggestions?
    – SandeshR
    Commented Oct 14, 2012 at 0:47

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.