nant

NAnt not running NUnit tests

流过昼夜 提交于 2019-12-12 12:21:26
问题 I'm using NUnit 2.5 and NAnt 0.85 to compile a .NET 3.5 library. Because NAnt 0.85 doesn't support .NET 3.5 out of the box, I've added an entry for the 3.5 framework to NAnt.exe.config. 'MyLibrary' builds, but when I hit the "test" target to execute the NUnit tests, none of them seem to run. [nunit2] Tests run: 0, Failures: 0, Not run: 0, Time: 0.012 seconds Here are the entries in my NAnt.build file for the building and running the tests: <target name="build_tests" depends="build_core">

calling batch files inside nant

萝らか妹 提交于 2019-12-12 10:43:19
问题 How can I call a batch file inside a nant script??? (Maybe having a target that calls the batch file). 回答1: That's pretty easy, actually - i'll try to illustrate: <target name="run-command"> <exec program="ConsoleTest.exe" basedir="${test.dir}"> <arg value="-cp" /> </exec> </target> The basedir is optional, it specifies where to run the program from. But if your program is on the path (like ping), you probably don't have to worry about it. Have a look at the official documentation as well :)

How to tell MSBuild where to put my compiled files?

社会主义新天地 提交于 2019-12-12 01:34:43
问题 I'm trying to use Nant to compile an ASP.NET MVC app, so far my build script just runs ms build and runs some other tasks, however I want my compiled files to be put in a "build" directory, how can I tell msbuild where to put the compiled files? 回答1: Looking here: http://msdn.microsoft.com/en-us/library/ms164311.aspx it specifies that you can set msbuild to override the output dir setting in your project file, like so: /properties:OutputDir=bin\Debug Is this what you want? 回答2: you can put

How does Cruise Control .NET use build / test tools?

允我心安 提交于 2019-12-11 20:28:37
问题 I am fairly new to CC .NET but have used other build tools in different environments (not C#) previously. My question is, when I choose NAnt as a Build Tool (for build scripts) & NUnit as a Test Tool (for testing) does CC .NET execute the command line for these tools with the parameters I specify in the config file? For example I have NAnt installed for my build scripts, will CC .NET execute NAnt.exe in the NAnt directory in order to build a project or does it do it by "other means"? Thanks.

Trying to Exclude Unit Tests from Code Coverage

牧云@^-^@ 提交于 2019-12-11 17:02:27
问题 I am trying to exclude the unit test projects/folders from the code coverage analysis since it is inflating the code coverage percentage. I have different layers/projects and unit test projects for each of those. As shown below. Solution DataAccess Business Service Model Test.DataAccess Test.Business Test.Service Test.Model How do I exclude any folder/project that has "Test.*" in its name/path? I want to exclude everything within those folders. I've tried the patterns below (and many others):

Debugging nant Duplicate Target

别等时光非礼了梦想. 提交于 2019-12-11 16:02:02
问题 Nant is complaining about a duplicate target, and as far as I can tell there is no duplicate. Is there some way to get nant to tell me which buildfiles it has open or is trying to open and where these tasks are so I can debug this? 回答1: Although I haven't found a reasonable debugging solution, I did find that this was related to updating nant. An old buildscript that worked began to break on a "duplicate target" error. This was because a taskfile was included by 2 other taskfiles already

Install/Uninstall a Windows Service in a build script with NAnt

為{幸葍}努か 提交于 2019-12-11 13:19:50
问题 Does NAnt have the ability to install or uninstall a windows service, using the InstallUtil utility or whatever else? 回答1: You can call Nant's exec task to call InstallUtil and can pass parameters to install or uninstall a service easily <target name="install-service"> <exec program="${framework::get-framework-directory('net-2.0')}\InstallUtil.exe"> <arg value="-i" /> <arg value="/name=V1" /> <arg value="C:\Service\SomeService.exe" /> </exec> </target> 回答2: Nant or MSBuild? What's the problem

Nant task copy UNC with a drive specified (eg. \\server\c$\program files\blah)

孤街浪徒 提交于 2019-12-11 13:13:26
问题 I would like to use Nant to copy files to a path like \\server\c$\program files\blah . To access this path, I first need to go \\server\c$ and enter and user and password, then the former path will work. Is there any way to do this automatically in Nant. I don't want to expose the folder as a share, security is tight and the share may get removed, especially since it will require write permissions. 回答1: You have 2 options, start the nant script with a user that has access to that admin share,

Nunit-console.exe fails with return code 7 using Nant and Bamboo

空扰寡人 提交于 2019-12-11 11:23:08
问题 I'm getting not too much saing error while running nunit test on Bamboo build server. It causes showing build resuts as red and shows that project has only 27 unit test and all they passing (project has more than 500 tests and some are failing) I've tried to run the same test using nunit-console on my local machine, but it runs without any problems. Bamboo log: [exec] D:\BambooAgent\..\nant.build(277,5): [exec] External Program Failed: C:\Program Files\NUnit 2.5.9\bin\net-2.0\nunit-console

How to catch errors while executing VB Project using NANT?

牧云@^-^@ 提交于 2019-12-11 08:13:28
问题 We are executing all the VB projects using below NANT script:Just example <target name="VBCompile" > <property name="failure.reason" value="VBCompile" /> <trycatch> <try> <foreach item="File" property="FileName" in="${VBProj.dir}"> <echo message="Creating Dll from: $:{FileName}" /> <exec basedir=${VBProj.dir} program=${VB6.exe} commandline=/MAKE ${FileName} outdir ${VBDll.dir} </foreach> </try> <catch> <fail message="${failure.reason}"/> </catch> <finally> //..some codes </finally> </trycatch