我们可以使用MSBuild构建一个网站 [英] Can we build a website using MSBuild

查看:187
本文介绍了我们可以使用MSBuild构建一个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Continous Integration的新手。有人可以让我知道我们是否可以建立一个网站使用MSbuild?

I am very much new to the Continous Integration. Could anyone please let me know whether we could build a website using MSbuild?

任何资料均可。

推荐答案

网站项目使用AspNetCompiler MSBuild任务。

You can build a Web Site project using the AspNetCompiler MSBuild task.

http://msdn.microsoft.com/en-us/library/ms164291.aspx

您的MSBuild文件可能看起来像这:

Your MSBuild file might look something like this:

<Project
        xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"
        DefaultTargets = "PrecompileWeb">
        <Target Name = "PrecompileWeb">
                <AspNetCompiler
                        VirtualPath = "DeployTemp" 
                        PhysicalPath = "C:\ccnet\myProject\WebSite"
                        TargetPath = "C:\ccnet\myProject\PreCompiled"
                        Force = "true"
                        Debug = "true"
                        Updateable = "true"/>
        </Target>
</Project>

然后在您的ccnet.config中,您可以在任务块中添加如下内容项目:

And then within your ccnet.config, you would add something like the following in the tasks block for your project:

<msbuild>
    <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
        <workingDirectory>C:\ccnet\myProject\</workingDirectory>
        <projectFile>C:\ccnet\myProject\myproject.msbuild</projectFile>
        <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>

这篇关于我们可以使用MSBuild构建一个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆