今天我尝试了很多事情来让我的构建在TeamCity中工作,但无济于事。TeamCity Build Failure
这是我的设置。
我有2个构建配置在TeamCity的
Build Solution
Build Deployment Package Debug
Build Solution
由SVN签入触发并构建溶液文件。这种配置工作正常。
Build Deployment Package Debug
具有Build Solution
作为其依赖项,并具有两个(MSBuild)构建步骤。该解决方案包含两个网站:一个前端和一个管理员。一个构建步骤构建前端网站,另一个构建管理网站。最终的结果是,它将组合结果放入一个zip文件中,以便部署到部署服务器(我还没有到这个位)。
我的问题是Build Deployment Package Debug
配置尝试构建第一个站点失败。这是错误:
[18:40:25]Step 1/2: Web (MSBuild) (29s)
[18:40:28][Step 1/2] x.Web\x.Web.csproj.teamcity: Build target: Build (27s)
[18:40:50][x.Web\x.Web.csproj.teamcity] MvcBuildViews (4s)
[18:40:50][MvcBuildViews] AspNetCompiler (4s)
[18:40:55][AspNetCompiler] C:\BuildAgent\work\252ec59002ecc2d\x.Web\obj\debug\csautoparameterize\original\web.config(39, 0): error ASPCONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
[18:40:55][x.Web\x.Web.csproj.teamcity] Project x.Web\x.Web.csproj.teamcity failed.
[18:40:55][Step 1/2] Step Web (MSBuild) failed
这里是构建Paramters - >系统属性
Name Value
system._PackageTempDir c:\deploypackage
system.Configuration Debug
system.CreatePackageOnPublish True
system.DeployIisAppPath Debug
system.DeployOnBuild True
system.PackageLocation c:\buildshares\Debug\Debug.zip
为什么是反面投票?我问了一个有效的问题,提供了大量的相关细节。 – 2013-04-26 14:41:47
[TeamCity错误与MVC 4和.NET 4.5]可能重复(http://stackoverflow.com/questions/16219319/teamcity-error-with-mvc-4-and-net-4-5) – 2013-04-28 08:15:45
可能的重复[从VS2010发布时(但仅在之前的版本之后),allowDefinition ='MachineToApplication']错误(http://stackoverflow.com/questions/2566215/allowdefinition-machinetoapplication-error-when-publishing-from-vs2010-but-on ) – JotaBe 2016-10-21 11:25:58