Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I had created an automated build script to test unit test cases those were created by NUnit using CruiseControl.net.
I had created one msbuild script as shown below:
HTML
<project defaulttargets="Build">
	xmlns="http://schemas.microsoft.com/developer/msbuild/2003">    
    <import project="<br" mode="hold" />      "C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>            
     <target name="Build">
        <msbuild projects="D:\Mymath\Mymath.sln" />
        <calltarget targets="Test" />       
    </target>
    <target name="Test">
       <message text="Tests to run"></message>
       <nunit assemblies="D:\Mymath\MyMathTest2\bin\Debug\MyMathTest2.dll">
           ContinueOnError="false"
           DisableShadowCopy="true"
           ToolPath="C:\Program Files\NUnit 2.5.10\bin\net-2.0\nunit-console-x86.exe"
           OutputXmlFile="$(Logs)\nunit-results.xml" />
   </nunit></target>
</project>


and my code for ccnet.config file is as shown below:

HTML
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
  <project name="Test10Project">   
    <weburl>http://localhost:8080/ccnet/</weburl>
    <triggers>
      <intervaltrigger seconds="60" />
    </triggers>   
    <tasks>
      <msbuild>
        <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
        <workingdirectory>D:\build1</workingdirectory>
        <projectfile>D:\Mymath\Mymath.sln</projectfile>
        <buildargs>/v:quiet /noconlog /p:Configuration=Debug</buildargs>
        <targets>Build</targets>
        <timeout>900</timeout>
        <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
      </msbuild>
      <exec>
        <executable>C:\Program Files\NUnit 2.5.10\bin\net-2.0\nunit-console-x86.exe</executable>
        <baseDirectory>D:\Mymath</baseDirectory>
        <buildargs>/testcontainer:D:\Mymath\MyMathTest2\bin\Debug\MyMathTest2.dll</buildargs>
        <buildtimeoutseconds>900</buildtimeoutseconds>
      </exec>
    </tasks>    
  </project>
</cruisecontrol>


Then my build executed successfully.But it shows below error
HTML
<buildresults>
  <message level="Error">fatal error: no inputs specified</message>
</buildresults>


Please let me know solution for this error.
Posted

1 solution

Edit the following line (removed testcontainer:) :
HTML
<buildargs>D:\Mymath\MyMathTest2\bin\Debug\MyMathTest2.dll</buildargs>
 
Share this answer
 
Comments
skumarn 10-Oct-11 6:18am    
Hi Mehdi,
Thank you... Very Very Much..... With you solution i resolved this error.
Mehdi Gholam 10-Oct-11 6:33am    
Cheers
skumarn 10-Oct-11 6:46am    
But one thing how can it shows BUILD SUCCESSFUL and that fatal error. I don't understand this. Please explain the problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900