c# - Exit code 100. Too many semaphores -
i'm writing c# program in visual studio 2012 , have problem. here's code fragment:
process proc = new process(); proc.startinfo.verb = "runas"; proc.startinfo.filename = "c:\\windows\\microsoft.net\\framework\\v4.0.30319\\regasm.exe"; proc.startinfo.arguments = "absolute\\path\\to\\file.dll /codebase /tlb"; proc.start(); proc.waitforexit(); messagebox.show("exit code: "+proc.exitcode); proc.close();
the problem is, when build debug binary , run it, works great. launches regasm.exe, registers dll, generates .tlb file , it's dandy.
but when run release binary, nothing works , messagebox shows me "exit code: 100". looked haven't found useful @ all.
found solution here: http://objectmix.com/dotnet/320921-regasm-tlb-complaints-element-not-found.html
regasm.exe error this:
regasm : error ra0000 : type library exporter encountered error while processing 'ruby2net.iruby2net, ruby2net'. error: element not found.
it looks because accidentally used same guid
twice in program. thank time.
lots of google hits "regasm exit code 100", have look-see.
regasm will display error message, can't see because console window closes. need keep open can read error message. running cmd.exe /k option (keep). roughly:
var proc = new system.diagnostics.process(); proc.startinfo.verb = "runas"; proc.startinfo.filename = "cmd.exe"; proc.startinfo.arguments = "/k c:\\windows\\microsoft.net\\framework\\v4.0.30319\\regasm.exe \"absolute\\path\\to\\file.dll\" /codebase /tlb"; proc.start();
Comments
Post a Comment