我们可以使用 MSBuild 建立网站吗

Can we build a website using MSBuild(我们可以使用 MSBuild 建立网站吗)
本文介绍了我们可以使用 MSBuild 建立网站吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我对持续集成非常陌生.谁能告诉我我们是否可以使用 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:ccnetmyProjectWebSite"
                        TargetPath = "C:ccnetmyProjectPreCompiled"
                        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:WINDOWSMicrosoft.NETFrameworkv3.5MSBuild.exe</executable>
        <workingDirectory>C:ccnetmyProject</workingDirectory>
        <projectFile>C:ccnetmyProjectmyproject.msbuild</projectFile>
        <logger>C:Program FilesCruiseControl.NETserverThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>

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

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

MSBuild cannot find a reference(MSBuild 找不到参考)
The reference assemblies for framework .NETCore, Version=v5.0 were not found(未找到框架 .NETCore,Version=v5.0 的参考程序集)
quot;File has a different computed hash than specified in manifestquot; error when signing the EXE(“文件的计算哈希值与清单中指定的不同签署EXE时出错)
Good-practices: How to reuse .csproj and .sln files to create your MSBuild script for CI?(良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 MSBuild 脚本?)
Run an MSBuild target only if project is actually built(仅在实际构建项目时运行 MSBuild 目标)
MS-Build BeforeBuild not firing(MS-Build BeforeBuild 未触发)