Open thefernman opened 6 years ago
Without understanding your error message; that code won't work because build
only declares a task; it doesn't run it. My guess is that you somehow get that declaration running and start umpteen msbuild processes in parallel.
Do you have a suggestion? That seems to be the problem. build
is prepped for all my solutions, and when that's done, those tasks are executed.
Currently, this is what my code looks like and I'm still getting too many files open error.
EDIT: I fixed it by spawning processes.
`desc 'Build all customers' task :build_customers do |t| logger.info 'Build customer dlls...' (Dir.glob(get_relative_path('../customers') + '///Web')).each do |dir| clean(dir) sln_path = dir + '/../Web.sln' out_dir = dir.gsub('/customers/','/build/') + '/Distrib' Rake::Task['build_client'].execute :sln_path => sln_path, :out_dir => out_dir end end
build :build_client, [:sln_path, :out_dir] do |b, args| sln_path = args[:sln_path] out_dir = args[:out_dir] logger.info "Building: #{sln_path} out to #{out_dir}"
b.sln = sln_path b.target = ['Clean', 'Build'] b.prop 'Configuration', 'Release' b.prop 'OutDir', out_dir b.prop 'ToolsVersion' , '4.6' b.logging = 'm' b.nologo end`
Start by formatting your code and I will look at it.
After 500 .sln files to build, I get a
Too many open files - where "msbuild" 2> nul
Stacktrace:
https://github.com/Albacore/albacore/blob/47454a2d51dff3834268b11a7e9b7f0f45c5c0f7/lib/albacore/cross_platform_cmd.rb#L205
Portion of my rakefile