nant

Cannot run nunit tests with Nant

≯℡__Kan透↙ 提交于 2019-12-11 06:44:02
问题 I'm trying to launch nunit ui tests with nant and get the error: Buildfile: file:///c:/UItests/nant.build Target framework: Microsoft .NET Framework 4.0 Target(s) specified: build build: [nunit2] 2012/06/20/13:29:52: Exception in set up method: The CurrentThread needs to have it's ApartmentState set to Apar tmentState.STA to be able to automate Internet Explorer. [nunit2] 2012/06/20/13:29:52: Exception in set up method: The CurrentThread needs to have it's ApartmentState set to Apar

Ant equivalent of nant.onsuccess / nant.onfailure

孤街醉人 提交于 2019-12-11 06:28:41
问题 NAnt has two built-in properties, nant.onsuccess and nant.onfailure , for specifying tasks to run on success and failure respectively. Is there an equivalent in Ant? 回答1: I don't think there's an ant equivalent but you could use trycatch (part of ant-contrib) <trycatch> <try> <!-- Your code here --> <!-- Success message --> </try> <catch> <!-- Fail message --> </catch> </trycatch> Hope this helps 回答2: Kev Jackson, gave a neat example of an exec-listener in his presentation, = http://people

How can I get Vault to use Windows Authentication from NAnt?

牧云@^-^@ 提交于 2019-12-11 03:02:28
问题 I am wanting to perform a number of tasks in SourceGear Vault (V4.1.4) with NAnt (V0.86.3317.0). Is there any way we can get Vault to use Windows Authentication from NAnt to create the connection? The NAnt block I am using to initialise the vault connect is: <target name="InitialiseVaultSettings"> <echo>InitialiseVaultSettings</echo> <vaultsetloginoptions user="${vault.Username}" password="${vault.Password}" URL="${vault.Host}" repository="${vault.Repository}" /> <vaultsetworkingfolder

How to convert NAnt function “path::combine(path1, path2)” to MSBuild?

被刻印的时光 ゝ 提交于 2019-12-11 00:00:15
问题 I need to convert the function "path::combine(path1, path2)". Please help me if you have some idea. Thank you! 回答1: Use the CombinePath Task: <Project DefaultTargets="DefaultTarget" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <MyBasePath>.\a\b</MyBasePath> <MySecondPath>c\d</MySecondPath> </PropertyGroup> <Target Name="Combine"> <PropertyGroup> <MySecondPath Condition="$(MySecondPath)==''">.\</MySecondPath> </PropertyGroup> <CombinePath BasePath="$(MyBasePath)

How to change one line in a file using NAnt?

荒凉一梦 提交于 2019-12-10 14:17:14
问题 I need to use NAnt to update one specific line in a .js file. The line will be something like: global.ServerPath = 'http://server-path/'; I need a way to update the "server-path" part of that line with that of the destination server. ReplaceString is no good, since I won't know what the path in the file is when I update it. Any help? Thanks in advance 回答1: If string::replace doesn't work <regex> can do the job. This is it: <?xml version="1.0" encoding="utf-8" ?> <project name="replace.line"

Going from <solution> to <exec program=msbuild> in NAnt

我是研究僧i 提交于 2019-12-09 01:21:38
问题 I've converted my app from .NET 1.1 to .NET 3.5 and unfortunately NAnt's tag does not support .NET 3.5. So I am trying to use the tag to kick off msbuild directly. Here is what I have for .NET 1.1: <solution solutionfile="MyApp.sln" configuration="ServerDebug" outputdir="MyApp\bin\ServerDebug"> <assemblyfolders> <include name="Dependencies\Libs\bin\ServerDebug"/> </assemblyfolders> </solution> I converted it to <exec program="msbuild"> <arg value="MyApp.sln /p:Configuration=ServerDebug;OutDir

TeamCity: Failed to detect target in MSBuild project

。_饼干妹妹 提交于 2019-12-08 21:18:48
问题 I have some problems with the TeamCity MSBuild replacement I think. I've tried to compile a Delphi 2010 Project (MSBuild compliant) with NAnt using the MSBuild task (NAnt Contrib). Everything works fine, if I do it without TeamCity on the console. If I try it with TeamCity, I get the following error message: Failed to detect default target(s) in the project file F:\CI\TeamCity\TeamCity\buildAgent\work\892195dab42324a3\build\src.temp\TestProject\Test.dproj. Please define targets explicitly in

Is it possible to send parameters into Nant task?

大城市里の小女人 提交于 2019-12-08 13:04:18
问题 I would like to have a nant task which builds code into either a dev/test folder depending on the type of build. Rather than have repeated tasks/targets with just different folders I would like to call Nant task from CruiseControl.NET with a different parameter dev / test. The nant task would then define a property for the output folder depending on the input parameter. I think I needs some kind of 'if' statement to test the parameter and define the correct one. Any ideas how to do this?

NAnt and MSBuild command line woes

独自空忆成欢 提交于 2019-12-08 05:08:09
问题 I'm trying to configure NAnt to automate my build process - once I've got this step nailed, I'll be integrating the unit tests. Perhaps I don't exactly know what I want, so please correct me if there is a completely different way of doing all of this... I want two NAnt targets, one to do quick, debug builds to make sure everything works and the tests pass, and another target to do a proper compile and publish (its a web application project) My problems are... I can't get MSBuild to compile

Nant: can't get current directory from .include

泄露秘密 提交于 2019-12-08 02:09:55
问题 It's not exactly easy for me to summarize this... I have this structure on disk: [dir] project [dir] foo [file] foo.build [dir] bar [file] bar.build [file] default.include The file default.include contains a couple of properties which are the directories used during the build. E.g: property name="build.dir" value="${directory::get-current-directory}". The default.include file is included by foo.build and bar.build using its relative path: include buildfile="..\default.include" Now the problem