I'm configuring a CruiseControl.net server for the first time. My team already uses NAnt build scripts, so we are just pointing the server at the scripts and letting NAnt do all the work.
As you can see, it's pretty simple:
<project name="ChannelIP">
<tasks>
<nant>
<executable>C:\Program Files\nant-0.86-beta1\bin\nant.exe</executable>
<baseDirectory>D:\mypath</baseDirectory>
<buildFile>D:\mypath\myNAnt.build</buildFile>
<targetList>
<target>build</target>
</targetList>
</nant>
</tasks>
</project>
The problem is that when I run it under CC, I get the following error:
Function call failed.
Expression:
${framework::get-framework-directory('net-3.5')}/msbuild.exe
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Microsoft .NET Framework 3.5 (net-3.5)
is not installed, or not correctly
configured. Object reference not set
to an instance of an object.
I do, in fact, use the ${framework::get-framework-directory('net-3.5')} variable to get the path to msbuild.exe; however, this code has never failed before. I can even RDP into the server using the user account that CC is running under and run the NAnt build file directly and it works just fine.
Why is it that this otherwise fine file fails just when CC runs it.
NOTE
-CC is running on the same machine that I normally run the build scripts from
The CC service is probably not running under an account with appropriate permissions. Have you tried running CC using the command line (which will run as the logged on user) to see if you have the same problem?
This sounds like a NAnt problem, there were some issues with it and .NET 3.5. Which version of NAnt are you using?
Also, have you seen Using 0.86 beta 1 for .NET 3.5? The guy has the same error message thrown by NAnt. The suggested solution was to use the latest nightly build.
Related
I am installing a DLL into my programs own directory, I am adding myself to the path environment variable.
<Environment Id="NewEnvironment1" Name="Path" Value="[INSTALLDIR]Core" Separator=";" Action="set" Part="last" Permanent="no" System="yes" />
I then call a visual basic program that then uses excel that needs to use the DLL on the path. It is Excel that is complaining it can not find my DLL.
<CustomAction Id='LaunchXLAReg' FileKey='RegisterXLAs' ExeCommand="" Execute='commit' Return='asyncNoWait' />
<InstallExecuteSequence>
<Custom Action="LaunchXLAReg" Before="InstallFinalize">NOT Installed</Custom>
<Custom Action="LaunchXLAUnReg" Before="InstallFinalize">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
</InstallExecuteSequence>
but when i printed out the path environment variable from within the visual basic my changes were not present, so the VB failed.
I then tried using the visual basic to set the path env variable, but this time the variable wasn't set on my system at the end of the installation process.
This is on windows 8.1 it used to work on windows 7
Edit: added the InstallExecuteSequence block, added clarification of which program is producing the error.
Windows Installer doesn't flush the environment variables to the system until the end of the install. It's not wise to commit them to the system until the install has actually succeeded and can't roll back - I think that's part of the reason. Also you are running as the child process of a service that doesn't pick up environment variables until a reboot.
It might work if your program can do the SystemParametersInfo call with the SPIF_SENDCHANGE setting:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx
that will broadcast this, but your program would need to handle the change message here:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms725497(v=vs.85).aspx
However, if you are running the exe from your own installed program directory and is deferred and after files have been installed, then it's not clear why it's not working because the Dll is right next to the exe, correct? So that means that if you specify a Directory in your custom action (which should be a type 34 or 35) then this will be the working directory. The WiX docs don't seem clear (to me) on this point but the custom action documentation clearly says that you can specify a directory as the working directory for your executable:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa372048(v=vs.85).aspx
See types 34 and 35. See also the WiX documentation that talks about using the Directory attribute:
http://wixtoolset.org/documentation/manual/v3/xsd/wix/customaction.html
In other words I think it all might just work if you use a directory of [INSTALLDIR] in your custom action specification.
I am currently trying to run Coverity Prevent and I believe I have everything set up appropriately on my windows 7 build machine. I have run it with AnthillPro and when my code finishes and gets to Coverity it says that everything was built fine and the only error I get is:
Warning: Cygwin pathname conversion ignored; no applicable
'bash'/'mount', 'cygpath', or registry keys found.
I have even tried to install Cygwin to see if this could rectify the problem and I still end up with the same error.
I am currently using AnthillPro 3.7 and Coverity 5.5.3. The build log says that I have warnings but no errors and that it hasn't emitted anything. I have tried to run a script directly from the machine (not server) itself and I have the same error as I do using the Coverity Prevent in Anthill
This is the only information I get at the bottom of the build log.
Run from AnthillPro:
Build time (cov-build overall): 00:00:17.753597
[WARNING] No files were emitted. This may be due to a problem with your configuration
or because no files were actually compiled by your build command.
Please make sure you have configured the compilers actually used in the compilation.
For more details, please look at:
d:\Coverity\Intermediate\AllToolsProjects.sln_pc_vs2010\build-log.txt
Run from Script:
The cov-build FAILED.
This may be because less than 90 percent of units were successfully compiled
Check for errors here:
D:\\Coverity\Scripts\build_AllToolsProjects.sln_pc_vs2010.bat
D:\\Coverity\Intermediate\AllToolsProjects.sln_pc_vs2010\build-log.txt
D:\\Coverity\Configuration\pc_vs2010
It sounds like you haven't configured the compiler - that's when you tell your Coverity Analysis installation which compiler you are using. devenv is not a compiler, cl.exe is.
Run the following command:
coverity-analysis-dir/bin/cov-configure --msvc
This will say that you are using the cl.exe compiler and it's of type msvc no matter where it's installed.
Then rerun your Coverity build and see if it captures more of your compilations.
My cruisecontrol runs two nant scripts and it builds by using msbuild. Msbuild is failing without giving any errors. Is there any way to get more error details? Below is how I have configured publishers.
<publishers>
<email from="cruise#xx..com.au" mailhost="stat-server" includeDetails="TRUE">
<users>
....
</users>
I can view the CruiseControl.net Build log through the web application "View Build Log" link. It gives all the details of the build process.
I normally start of running the build scripts from the command line on your build server.
You can also run MSBuild with a verbosity switch, that increase the amount of debug information. That will at least give you a idea of where the problem lies, perhaps your cruise control server is fine.
msbuild.exe <buildFile.msbuild> /v:d
I'm using CruiseControl.NET with MSTest to build my vs2008 project and run my unit tests.
If I run the tests from Visual Studio 2008, they work perfectly. However, when the tests are started by CruiseControl, the VsPerfMon.exe and VsTestHost.exe processes hang until i end them from the taskmanager. This means that cruisecontrol itself hangs also and i never get a result for my build in cruisecontrol.
Does anybody have any idea what might be the solution to my problem?
Thanks,
D
This sounds like they may be waiting for user input? - You could try running the msbuild task (or NAnt if thats what you use) on the server yourself to check
Also check what user account the CruiseControl.Net service is running as and maybe switch it to your user account and see if that changes it - that way you would know if its related to account permissions etc
check this http://social.msdn.microsoft.com/Forums/pl-PL/tfsbuild/thread/af706a24-d47a-4a90-b3e6-beb5691f3aa0
have not tested yet...
Possible solution would be to add a AfterCompile target to kill the VSPerfCmd before the tests run.
<Target Name="AfterCompile">
<Message Text ="Shutdown the vsperfmon" />
<Exec Command='"C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools\VSPerfCmd.exe" /shutdown' ContinueOnError="true" />
</Target>
I'm trying to call a PSExec task from CC.NET and running into some difficulties.
Here's the CC project
<project name="Test">
<tasks>
<exec>
<executable>C:\Utilities\psexec.exe</executable>
<buildArgs>-u [UNAME] -p [PWD] "C:\Utilities\Joel.bat"</buildArgs>
</exec>
</tasks>
</project>
Here's the source of Joel.bat
CLS
#ECHO OFF
What happens is that the first time I force the project to build, it runs successfully. The PSExec task is kicked off and the Joel.bat file is executed. I get some information in the build log about exit codes, but the task is successful.
Here's the build log output.
PsExec v1.97 - Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\Utilities\Joel.bat exited with error code 0.
The second time I force the build I get the dreaded "The Application failed to initialize properly (0xc0000142)" error message. I can't ever run the build more than once
More so, if I try to shut down the cruise control .net service from within the services MSC, it can't. It's like there's a lock somewhere that is taken and not released. The only way I can kill the service is by killing the ccservices.exe process.
I've tried the exact same thing using an nant task and gotten the exact same results. It works the first time, and fails the second and I can't shutdown the process.
I'm not sure if this is an issue with CC.NET or with PSEXEC (or me of course).
Anybody got any ideas? I'm posting to the CC.NET forums as well.
I'm using the latest and greatest of PSExec and 1.4.4 of CC.NET.
Thx, Joel
Run CruiseControl service under administrator account
Have you tried any other psexec options?
-d Don't wait for application to terminate. Only use this option for non-interactive applications.
maybe its the old eula problem, try the /accepteula option for psexec