我有一个构建 asp.net 应用程序的 msbuild 任务
msbuild :build do |msb|
puts "Running local build"
msb.properties :configuration => :Release, :outdir => File.dirname(__FILE__) + "/output/"
msb.targets :Build
msb.solution = 'App.sln'
msb.verbosity = 'quiet'
end
在本地运行它可以很好地运行,但是当 Teamcity(5.1.2,构建 13430)尝试构建它时,它会失败并出现以下错误:
[18:13:04]: C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/albacore/support/attrmethods.rb:7: warning: parenthesize argument(s) for future version
[18:13:04]: C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/albacore/support/attrmethods.rb:7: warning: parenthesize argument(s) for future version
[18:13:05]: Execute build
[18:13:05]: [Execute build]
RuntimeError: MSBuild Failed. See Build Log For Detail
Stacktrace:
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/albacore/support/failure.rb:12:in `fail_with_message'
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/albacore/msbuild.rb:41:in `build_solution'
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/albacore/msbuild.rb:26:in `build'
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/rake/msbuildtask.rb:2
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/rake/support/createtask.rb:17:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/rake/support/createtask.rb:17:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/albacore-0.1.5/lib/rake/support/albacoretask.rb:16:in `define'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `standard_execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `standard_execute'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:260:in `execute'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:90:in `target_exception_handling'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:266:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
C:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
C:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
C:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `standard_invoke_with_call_chain'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:235:in `invoke'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:90:in `target_exception_handling'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:234:in `invoke'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:311:in `standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:311:in `standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:179:in `run'
C:/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rakerunner.rb:40
当我尝试从构建代理的文件夹运行 rake 脚本时,构建脚本成功完成。我唯一的想法是 msbuild 输出此警告:
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets:警告 MSB3247:发现同一依赖程序集的不同版本之间存在冲突。