nant

NAnt: Check if include file was already included

强颜欢笑 提交于 2020-01-06 19:52:19
问题 Does anybody know a way to check if a file was already included? <include buildfile="${script.dir}\util.include.nant" /> . . . . <include buildfile="${script.dir}\util.include.nant" /> This will throw an exception that a target was duplicated. Is there a way around? Thanks in advance 回答1: Just saw this question which seems related and decided to change the case of one of the duplicate includes in a.build in my other answer to: <include buildfile="c.build" /> <include buildfile="C.build" />

How to do error handling in nant build scripts?

♀尐吖头ヾ 提交于 2020-01-04 13:34:26
问题 I am writing a NAnt build script which is responsible for deploying some files to an iss server. As part of this I would like to add error handling to my scripts - something which I haven't used before. Introducing error handling inevitably leads to thoughts about the structure of the build file (s). I think of structure as the grouping of logic in targets and the dependencies between these. In NAntContrib I have found the task which should make the job easier than the standard "onfailure"

How to run NUnit v2.4.8 tests with NAnt 0.86 beta?

这一生的挚爱 提交于 2020-01-03 10:45:30
问题 I tried recently to use NAnt (beta 0.86.2962.0) to run some unit tests compiled with the last stable version of NUnit (v2.4.8) without any success. The error I get is the following : [nunit2] Assembly "C:\Dev\MySample\bin\tests\My.Sample.Tests.dll" contains no tests. Of course, the assembly contains tests that I can run from any runner, like NUnit one, TestDriven or Resharper. I would like to use <nunit2> task, and not directly the <exec> one, but I'm wondering if it is still possible, even

Setting debug=false in web.config as part of build

让人想犯罪 __ 提交于 2020-01-03 09:26:04
问题 Is it possible to instruct the aspnet_compiler to set debug=false in the web.config? My intention is to automate this as part of the nant build process. I am open to suggestions other than xml parsing 回答1: Have you thought about using <xmlpoke> ? <xmlpoke file="${Build.WebConfig}" xpath="/configuration/system.web/compilation/@debug" value="false"> </xmlpoke> NAnt Home Page XML Poke Documentation 回答2: I would suggest using entirely different config files for each environment(prod, test,

Integrating PartCover.NET with NAnt

妖精的绣舞 提交于 2020-01-02 07:10:10
问题 I'm trying to integrate PartCover.NET with NAnt and CruiseControl.NET I can run PartCover.NET browser without problems, but it does not work once I try to run it in an NAnt task (in my CCNET build). There must be an issue with my NAnt target but I can't find it. Maybe someone had experienced the same issues in the past?. <target name="CoverageUnitTest" description="Code coverage of unit tests"> <exec program="${PartCover.exe}"> <arg value="--target=${NUnit.console}" /> <arg value="--target

When running NUnit and specifying a category, can all uncategorized tests be included too?

荒凉一梦 提交于 2020-01-01 09:38:11
问题 We have several hundred test classes, with a few dozen of them marked with the following attributes: [TestFixture] [Explicit] [Category("IntegrationTests")] so they will only be run in our over-night automated build. The remaining TestFixtures don't have a Category specified (and are not marked Explicit either). Here is the NAnt task we are running to execute our tests: <nunit2> <test> ... <categories> <include name="IntegrationTests" /> </categories> ... </test> </nunit2> This, of course,

NAnt <msbuild> custom output directory

血红的双手。 提交于 2020-01-01 05:13:28
问题 I'm new to NAnt and have been able to create a <target> which 1) Deletes any code from the current folder 2) Exports fresh code from SVN 3) Builds the code in the default directory which is the PrecompiledWeb folder (its a web app) Here it is: <target name="export" description="export code from svn"> <delete dir="${Delete.Dir}"></delete> <exec program="svn" commandline="export ${MySVN.Repos} ${MySVN.Dest}" /> <msbuild project="${Solution.Filename}"> <property name="Configuration" value=

.NET projects build automation with NAnt/MSBuild + SVN

若如初见. 提交于 2019-12-31 17:22:34
问题 for quite a while now, I've been trying to figure out how to setup an automated build process at our shop. I've read many posts and guides on this matter and none of them really fits my specifics needs. My SVN repository is laid out as follows \projects \projectA (a product) \tags \1.0.0.1 \1.0.0.2 ... \trunk \src \proj1 (a VS C# project) \proj2 \documentation Then I have a network share, with a folder for each project (product), which in turn contains the binaries, written documentation and

Does the free Team Explorer client work without Visual Studio

荒凉一梦 提交于 2019-12-30 11:41:47
问题 We are about to setup a cruise control.net with and NAnt and TFS, do I need visual studio 2005/2008 with team explorer installed or can I make this work with just the free Team explorer client 回答1: Team Explorer will install the VS shell, which gives it enough of VS to operate. So strictly the answer is "yes, Team Explorer requires VS", but since VS is included in the Team Explorer install the strict answer is kind of unhelpful :-). Once Team Explorer is installed, you get access to the TF

MSDeploy all configuration [.config files] in one package

白昼怎懂夜的黑 提交于 2019-12-30 04:50:08
问题 We have 4 different environments at the moment (Lab, Test, Stage, LIVE) and we have implemented automatic deployment using Nant/CC.Net. I am investigating and doing some research as to what can be done more efficiently with new MSDeploy tool. What I want to achieve is to create a package with a Configuration folder inside which we will have all the different configuration files for all the possible environments (basically adding all config transform files) What I want to achieve is automatic