tlbExp.exe
を使用して C#から呼び出そうとしていますProcess.Start
。コマンド文字列を引数として渡しますが、その文字列の種類に関係なく、常にエラー メッセージが表示されます。
The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
デバッグ中にコマンド ウィンドウでコマンド文字列を個別に実行しようとすると、本来の動作 (dll から生成された tlb) が実行されます。ただし、コードから機能させることはできません。
string tlb;
...
tlb += @"C:\Program files\Microsoft SDKs\Windows\v6.0A\bin\tlbExp.exe";
tlb += @""""; tlb += @" """; tlb += outputDllPath;
tlb += @""" /out:"""; tlb += outputTlbPath; tlb += @"""";
Process.Start(tlb);