nant

NAnt <msbuild> custom output directory

夙愿已清 提交于 2019-12-03 14:32:18
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="Release"/> </msbuild> </target> I want to specify a custom output directory (other than "PrecompiledWeb").

upload file with FTP using nant

送分小仙女□ 提交于 2019-12-03 12:36:27
问题 I have an NAnt script that I use to build my .NET project, and I'm looking to see if there is a way to upload the resulted assemblies to some remote folder using an FTP task. I couldn't find any good example online, and I'm wondering if anyone knows how to do it, if it's doable at all. FYI: I'm running it on a windows machine, if it makes any difference. 回答1: You could use WinSCP as console application in a NAnt <exec> task. Using WinSCP will give You access to extra goodies like

Publish WebApplication using NAnt

本秂侑毒 提交于 2019-12-03 11:17:13
问题 Is it possible to accomplish publish (as in Visual Studio publish on Web Application project) on solution using NAnt? I just can't find the solution. 回答1: They key is to use the built-in "_CopyWebApplication" target. Here is what i do <target name="compile" description="Compiles the project."> <exec basedir="." program="${DotNetPath}msbuild.exe" commandline=" src/MyProject.Web/MyProject.Web.csproj /nologo /t:Rebuild /t:ResolveReferences;_CopyWebApplication /p:OutDir=../../output/build/bin/ /p

Nant failing with bad permissions on build server

旧城冷巷雨未停 提交于 2019-12-03 05:57:51
Total newbie question. I am trying to run a Nant script on a build server (very basic script, not doing anything), and it's failing with the error System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. What should I do to get it running? @TK has the answer here, I believe, though it may not be as simple as whether or not nant is running from a network drive. I have had a similar issue as @Aidan. It turns out that I had copied the nantcontrib (v .86)

ASPNETCOMPILER : error ASPRUNTIME: Target Directory not empty

烈酒焚心 提交于 2019-12-03 05:25:52
I have a web application that needs to be built using a nant script. All the projects in the solution build fine but for this error that crops up each time at the end of the build. I couldn't find much useful information on resolving this error. Has anyone encountered and fixed this kind of issue before? Any help would be much appreciated. [exec] ASPNETCOMPILER : error ASPRUNTIME: The target directory is not empty, and does not appear to contain a previously compiled application. Please delete it manually, or choose a different target. [C:\SRC\BorgWorld\trunk\apps\Zombies.metaproj] Delete the

Does MSbuild require Visual Studio to be installed on the build server?

心已入冬 提交于 2019-12-03 01:09:48
问题 Can we use MSBuild without Visual Studio 2012? Currently, we have a build server where we are compiling and creating deployment copy of one of our projects, it has Visual Studio Professional Edition installed. We are setting up a new build server now. Do we really need Visual Studio 2012 on the new build server? If yes, then how? I googled it but I couldn't find an answer. 回答1: No, you don't need Visual Studio on your build box. If I recall correctly, msbuild is installed as part of the .NET

Publish WebApplication using NAnt

限于喜欢 提交于 2019-12-03 00:44:38
Is it possible to accomplish publish (as in Visual Studio publish on Web Application project) on solution using NAnt? I just can't find the solution. They key is to use the built-in "_CopyWebApplication" target. Here is what i do <target name="compile" description="Compiles the project."> <exec basedir="." program="${DotNetPath}msbuild.exe" commandline=" src/MyProject.Web/MyProject.Web.csproj /nologo /t:Rebuild /t:ResolveReferences;_CopyWebApplication /p:OutDir=../../output/build/bin/ /p:WebProjectOutputDir=../../output/build/ /p:Debug=${debug} /p:Configuration=${configuration} /v:m"

Does MSbuild require Visual Studio to be installed on the build server?

眉间皱痕 提交于 2019-12-02 14:27:21
Can we use MSBuild without Visual Studio 2012? Currently, we have a build server where we are compiling and creating deployment copy of one of our projects, it has Visual Studio Professional Edition installed. We are setting up a new build server now. Do we really need Visual Studio 2012 on the new build server? If yes, then how? I googled it but I couldn't find an answer. No, you don't need Visual Studio on your build box. If I recall correctly, msbuild is installed as part of the .NET framework - it certainly used to be. Depending on what you're building, you may find that there are some

nant mail issues

China☆狼群 提交于 2019-12-02 12:44:00
问题 Can anyone please suggest me how we could configure the sending of mails through nant.I had even gone through the link but i was unsucessfull. thanks and regards maddy 回答1: Something like this is what you would use. <target name="sendmail"> <mail from=“NAnt@myCompany.com“ tolist=“${distribution_list}“ subject="${mailsubject}" mailhost="${smtpServer}" message="${mailbody}" verbose="true" > <attachments> <include name="${buildroot}/build.log" /> </attachments> </mail> </target> 回答2: Here is a

How to run a Nant task with Ant?

限于喜欢 提交于 2019-12-02 07:20:58
I am looking to do something that seems feasible, but searches on Google do not return something as precise as what I need. We inherited Nant scripts from a previous company that localizes websites. They work great. We have our own Ant scripts that compare two SVN repositories and then merge them. We would like to call the Nant script while the Ant scripts are run. Anybody can provide some guidance as of how to do that? We are not looking to rewrite the Nant script in Ant, so please avoid that suggestion. Thanks! You call put your ant scripts in a batch file (ant_tasks.bat) and then execute it