发布使用WebApplication的楠 [英] Publish WebApplication using NAnt
本文介绍了发布使用WebApplication的楠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能实现发布(如在Visual Studio的Web应用程序项目发布)使用南特上的解决方案?我只是无法找到解决方案。
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.
推荐答案
他们关键是使用内置的_CopyWebApplication的目标。
They key is to use the built-in "_CopyWebApplication" target.
下面是我做的。
<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"
workingdir="." failonerror="true" />
</target>
用的目录结构:
/project.build
/src/myprojct.sln
/src/myporject.web/myproject.web.csproj
/output
编辑:我也用这个来使用YUI COM pression对COM preSS我的CSS和JS
i also use this to use the YUI compression to compress my css and js
<target name="compress-js">
<foreach item="File" property="filename">
<in>
<items basedir="output/build/assets/javascript/">
<include name="/**/*.js" />
<exclude name="/**/*.min.js" />
<exclude name="/**/*.pack.js" />
</items>
</in>
<do>
<exec basedir="." program="${JavaPath}java" commandline=" -jar S:\yuicompressor-2.4.1\build\yuicompressor-2.4.1.jar --type js --charset utf-8 -o "${filename}" "${filename}"" failonerror="true" />
</do>
</foreach>
</target>
<target name="compress-css" depends="combine-css">
<foreach item="File" property="filename">
<in>
<items basedir="output/build/assets/css/">
<include name="/**/*.css" />
<exclude name="/**/*.min.css" />
<exclude name="/**/*.pack.css" />
</items>
</in>
<do>
<exec basedir="." program="S:\Java\jdk1.6.0_11\bin\java" commandline=" -jar S:\yuicompressor-2.4.1\build\yuicompressor-2.4.1.jar --type css --charset utf-8 -o "${filename}" "${filename}"" failonerror="true" />
</do>
</foreach>
</target>
这篇关于发布使用WebApplication的楠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文