|
#1
|
|||
|
|||
Automated build problem
I am trying to set up an automated build of my software. I created a .bat file which is run by Task Scheduler. The .bat file creates a build directory, gets the VBP build file from SourceSafe into the build directory, and invokes VisBuildCmd.exe on the VBP build file.
Frequently the build fails and VisBuildCmd.exe gives a 'class not registered' error. If I run the .bat file manually the next morning, the build succeeds. Any ideas what is going wrong? TIA, Bill |
#2
|
|||
|
|||
Not really. It sounds like some of the VBP COM registry entries are getting corrupted, but that wouldn't explain why it would work later unless you are re-registering VBP components or re-installing VBP in between. Does the user the scheduld task is running under have the same rights as the user you use to successfully build manually? Are you using the latest version of VBP? Can you send a complete log of the error information (may shed more light on exactly what it's trying to do when it fails)? Thanks.
|
#3
|
|||
|
|||
Below is the output from the batch file. I don't know what other logging information I can provide since the VBP builder component isn't even instantiated so the VBP log isn't even created yet.
C:\Documents and settings\wta>rem @echo off C:\Documents and settings\wta>call ssenv.bat C:\Documents and settings\wta>path=C:\WINNT\system32;C:\WINNT;C:\WI NNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;c:\documents and settings\wta;c:\documents and settings\wta\My Documents\utils;C:\Program Files\Microsoft Visual Studio\VSS\win32 C:\Documents and settings\wta>SET SSDir=g:\xxx VSS C:\Documents and settings\wta>SET BUILDDIR=O:\BuildDir C:\Documents and settings\wta>rmdir /S /Q "O:\BuildDir" C:\Documents and settings\wta>mkdir "O:\BuildDir" C:\Documents and settings\wta>ss get -I- "$/xxx/Build" "-GLO:\BuildDir" $/xxx/Build: Getting xxx.bld Getting MSDEV_VLAA_REGISTRY.vbs Getting ParseVS6BuildDirs.vbs Getting ParseVS7BuildDirs.vbs Getting SetDirs.wsf Getting StampVer.exe Getting stampver.ini Getting StampVersion.wsf Getting stampversion.xml Getting UnRegisterTypeLib.exe Getting VS6BuildDirs.xml Getting VS7BuildDirs.xml C:\Documents and settings\wta>"C:\Program Files\VisBuildPro\VisBuildCmd.exe" /b "O:\BuildDir\Build\xxx.bld" VisBuildCmd, Version 5.0.2.3 Copyright (C) 1999-2003 Kinook Software, Inc. All rights reserved. Error creating builder component: Class not registered C:\Documents and settings\wta>xcopy /Y /S /I "O:\BuildDir\Installers" "O:\BuildDir\.." 0 File(s) copied |
#4
|
|||
|
|||
Something is apparently removing the COM registry info for the builder component (not sure what). Try reinstalling VBP. You can also use the attached file and the following statement before the VisBuildCmd line in your batch file to ensure it is registered properly:
regedit /s C:\VisBuildBld.reg |
#5
|
|||
|
|||
I just had a thought. I wonder if there is a backup job running at night on our build machine which locks the registry while its running. I'll have to investigate that theory with the admin.
Also, I should probably mention the build machine is a Windows 2000 Terminal Services server. I don't know if that makes a difference. |
#6
|
|||
|
|||
What if another build were running as a different user (also invoked by task scheduler) at the same time on the same machine? Would that cause this error?
|
#7
|
|||
|
|||
The VBP components themselves only read the registration information, and I'm quite certain that Windows supports multiple simultaneous readers of the same registry values. The only thing in VBP that would remove the reg info is the uninstaller.
Your backup theory is a possibility: http://groups.google.com/groups?hl=e...3DN%26tab%3Dwg |
#8
|
|||
|
|||
I don't think its the backup program. I seem to be able to run my batch file from the command prompt anytime. It's only if it runs from the task scheduler that it fails.
Update: It is definitely an issue where another build is running as a different user at the same time as my build; both started by task manager. His build is hanging in a script step which keeps VisBuildCmd.exe running forever. When my build tries to run it fails with the 'class not registered' error. However, as it has always done, it still runs if I run my batch file explicitly from the command line; even if his build is hung. Maybe because the cmd.exe is the parent proces s instead of mstask.exe? Interestingly, if I run his build as me and then run my build, it works. Last edited by BillArnette; 07-08-2004 at 10:00 PM. |
#9
|
|||
|
|||
Any thoughts on this? We are still having this problem.
Thanks, Bill |
#10
|
|||
|
|||
It sounds like an obscure bug in Windows Scheduled Tasks. Some things to try:
1) Configure both tasks to run under the same user account. 2) Use AT instead of Scheduled Tasks (discussed in the 'scheduled builds' help topic) 3) Use an alternate task scheduling application (http://www.google.com/search?hl=en&i...duler+software). 4) Upgrade to the latest server software (Windows Server 2003) with all patches and hotfixes. |
|
|