Can we build a website using 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 建立网站吗


基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01