nant

how to modify source with NAnt?

╄→гoц情女王★ 提交于 2019-12-21 10:21:47
问题 I would like to modify the string in a .h file with NAnt before building the solution. There is a macro in .h file: #define SERVER_ADDRESS "www.customserver.net" and I would like to modify the string before deploying software so each build could be made for custom address by passing the address in command line. Does anyone know how this could be done? Thanks! 回答1: One could use the loadfile task to help with this. This task loads the given file into a property. What is really useful is when

How to add custom HTTP Headers to IIS from the command line

孤街浪徒 提交于 2019-12-21 06:35:10
问题 We have an ASP.NET application and I need to add a custom HTTP header to IIS for all the developers on the team, so I want to add a command in the NANT script that will add the HTTP Header when the build script is run. Is it even possible to do this from the command line. I've been looking up the documentation on cscript adsutil.vbs but I can't find anything specfic to this issue. 回答1: Ok solution found. Clearly I wasn't looking hard enough, this is the command line to set the Custom HTTP

How to add custom HTTP Headers to IIS from the command line

心不动则不痛 提交于 2019-12-21 06:34:14
问题 We have an ASP.NET application and I need to add a custom HTTP header to IIS for all the developers on the team, so I want to add a command in the NANT script that will add the HTTP Header when the build script is run. Is it even possible to do this from the command line. I've been looking up the documentation on cscript adsutil.vbs but I can't find anything specfic to this issue. 回答1: Ok solution found. Clearly I wasn't looking hard enough, this is the command line to set the Custom HTTP

Advantages of using MSBuild or NAnt versus running DevEnv.exe from command-line

吃可爱长大的小学妹 提交于 2019-12-18 11:07:40
问题 Can anyone explain what advantages there are to using a tool like MSBuild (or NAnt) to build a collection of projects versus running DevEnv.exe from the command-line? A colleague I had worked with in the past had explained that (at least with older versions of Visual Studio) using DevEnv.exe was much slower than the other techniques, but I haven't read any evidence of that or if that is now a moot point now that starting with 2005, Visual Studio uses MSBuild under the hood. I know one

MSBuild 2010 - how to publish web app to a specific location (nant)?

ε祈祈猫儿з 提交于 2019-12-18 10:44:24
问题 I'm trying to get MSBuild 2010 to publish a web app to a specific location. I can get it to publish the deployment package to a particular path, but the deployment package then adds its own path that changes. For example: if I tell it to publish to C:\dev\build\Output\Debug then the actual web files end up at C:\dev\build\Output\Debug\Archive\Content\C_C\code\app\Source\ControllersViews\obj\Debug\Package\PackageTmp And the C_C part of the path changes (not sure how it chooses this part of the

Choice for build tool: MSBuild, NANT or something else?

醉酒当歌 提交于 2019-12-17 07:53:08
问题 I am doing automation in my company. We are a C# workshop. Currently I am working on automated build. NANT is flow control tool. While NANT is not actively developed (last binary released on June 2012 and github repo is not active), MSBuild is better. Therefore, I prefer MSBuild but retiring NANT is still questionable - what is the cost? I have come up with some pros and cons, but I know collective intelligence is better. Thanks for your help! Update : I have read the question, but the second

How to exclude project from build in MSBUILD?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 07:23:09
问题 I need to build a solution but exclude one project. How should I do it? I searched a lot about this issue but nothing could help. ItemGroup section rise the following exception: Invalid element . Unknown task or datatype. PropertyGroup also rise the exception. Below is my code sample: <project name="TI 8.1.6 build script"> <ItemGroup> <Solution Include="${ROOT}\Core\TI Core.sln" Exclude="${ROOT}\Utilities\DTS Indexing Service\Tdi.Origami.IndexUpdaterServiceSetup\Tdi.Origami

Is it possible to read cookie/session value while executing PHP5 script through command prompt?

心已入冬 提交于 2019-12-17 04:37:08
问题 I need to read some values from cookie or session when I am executing my php script using command prompt. How can I do that? How to access cookie or session value from Windows command prompt? 回答1: Cookies are sent from the user's web browser. When you execute a php script from the command line, there is no browser to send or receive cookies. There is no way to access or save cookies and nothing is sent to the script except the parameters you pass on the command line. That being said, there is

Build VS2008 projects with .Net 2.0/.Net 3.5 using NAnt

微笑、不失礼 提交于 2019-12-14 04:06:00
问题 I'm trying to write a build file to build a simple C# solution but it is failing with the error: Unknown task or datatype . My solution is written in VS2008 but targeted at .Net 2.0 (I'm using Vista if that helps). I've already seen the other question running-builds-using-net-3-5-msbuild-and-nantcontrib and have tried the suggested solution and have made the change to my NAnt.exe.config file. I've tried changing the solution properties to target .net 3.5 (and changing the build file

Are There Any Best Practices for Writing Custom NAnt, Ant, or MSBuild tasks?

喜欢而已 提交于 2019-12-14 03:49:10
问题 I'm in the process of writing a custom task for NAnt. I've been basing how I write the code based on some examples I've found on the Internet and by looking at the source of some other tasks for both NAnt and Ant. With that being said, are there any guidelines or best practices for writing good tasks for build managers like NAnt, Ant, or MSBuild? I'm looking for such in terms of exception handling and modularity (i.e. if my task does something with the file structure should I delete and