【问题标题】:Team Build 2010 doesn't publish Websites if configuration is other than Debug or Release!如果配置不是调试或发布,Team Build 2010 不会发布网站!
【发布时间】:2011-05-27 07:00:25
【问题描述】:
我正在使用 Team Foundation 2010 Team Build 自动部署网站和项目。但我无法让它以正确的方式与网站一起工作......
如果我使用 Debug/Release 配置,会发生什么情况,网站在编译后发布。没事。
但我已经创建了另一个配置(在配置管理器中)以满足我的需要,并且我确定我检查了我的网站以构建此配置。
当我在服务器上排队一个新构建时,它会编译所有内容但给我一个错误:
找不到路径“\server-name\Deploy\build-name\build-number_PublishedWebsites\website-name\”的一部分。
有人知道发生了什么吗?为什么不发布?
【问题讨论】:
标签:
configuration
tfs
build
tfsbuild
【解决方案1】:
嗯,我说得“对”。我在这里发帖以防有人想知道。但是,如果有人知道更好的方法,请告诉我
我找到了一种解决方法,它包括手动编辑 .sln 文件并将 AspNetCompiler 属性添加到其他配置中。
在 ProjectSection(WebsiteProperties) 下,
Release.AspNetCompiler.VirtualPath = "/site"
Release.AspNetCompiler.PhysicalPath = "site\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\site\"
Release.AspNetCompiler.Updateable = "false"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "true"
Release.AspNetCompiler.Debug = "False"
我在下面添加了这些东西:
MyConfiguration.AspNetCompiler.VirtualPath = "/site"
MyConfiguration.AspNetCompiler.PhysicalPath = "site\"
MyConfiguration.AspNetCompiler.TargetPath = "PrecompiledWeb\site\"
MyConfiguration.AspNetCompiler.Updateable = "false"
MyConfiguration.AspNetCompiler.ForceOverwrite = "true"
MyConfiguration.AspNetCompiler.FixedNames = "true"
MyConfiguration.AspNetCompiler.Debug = "False"
它就像一个魅力。但是不要在之前或之后留下任何空行,否则构建会失败。