Je vais précompiler une application asp.net dans mon formulaire C# personnalisé. Comment puis-je récupérer les journaux de processus et vérifier si le processus est réussi ou non?Comment obtenir le journal de Process.Start
Voici mon code
string msPath = "c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\";
string msCompiler = "aspnet_compiler.exe";
string fullCompilerPath = Path.Combine(msPath, msCompiler);
msPath.ThrowIfDirectoryMissing();
fullCompilerPath.ThrowIfFileIsMissing();
ProcessStartInfo process = new ProcessStartInfo
{
CreateNoWindow = false,
UseShellExecute = false,
WorkingDirectory = msPath,
FileName = msCompiler,
Arguments = "-p {0} -v/{1}"
.StrFormat(
CurrentSetting.CodeSource,
CurrentSetting.CompileTarget)
};
Process.Start(process);
Merci!
La classe ProcessStartInfo ne possède pas de méthode appelée Start() et StandardOutput()? –
@Martin Ongtangco - Non, ce n'est pas le cas. 'Process' fait. Voir ici: http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo_methods.aspx – Oded
Salut, je reçois cette erreur, mais aucun détail pour m'aider ... "Le système Impossible de trouver le fichier spécifié " –