Le_proprio_de_mykeyes
Messages postés60Date d'inscriptionmardi 26 juillet 2005StatutMembreDernière intervention16 avril 2006
-
8 févr. 2006 à 03:16
Le_proprio_de_mykeyes
Messages postés60Date d'inscriptionmardi 26 juillet 2005StatutMembreDernière intervention16 avril 2006
-
9 févr. 2006 à 01:23
Pour mon programme j'utilise System.Diagnostics.Process.Start() pour éxécuter la console c# avec les paramètres appropriés (ex: csc /out:"C:\C#Text\Test.exe" /target:winexe "C:\C#Text\test.cs" "C:\C#Text\AssemblyInfo.cs" /r:"C:\C#Text\functions.dll","C:\C#Text\shell.dll" /optimize+ /unsafe-)
Je voudrais récupérer les messages d'erreur qui apparaissent, mais c'est la le probleme...
J'ai déjà essayé les fonctions intégrées à .net, mais là il faudrait référencer aussi System.windows.forms.dll, etc. car ce n'est pas automatisé.
S'il vous plait si quelqu'un connait la réponse, pourrait on m'aider?
---------------------------------
Ceci n'est pas vraiment utile mais voilà le code de l'application:
void Button7Click(object sender, System.EventArgs e)
{
string[] Ctypes = new string[]{"winexe","exe","library"};
string[] bools = new string[]{"+","-"};
string cstr="";
if (this.CompName.Text != "")
cstr+="/out:""+this.CompName.Text+"" ";
cstr+="/target:"+Ctypes[this.CompType.SelectedIndex]+" ";
string tmpfile="";
foreach (object x in Files.Items)
{
if (tmpfile=="")
tmpfile+="""+(string)x+""";
else
tmpfile+=" ""+(string)x+""";
}
cstr+=tmpfile+" ";
if (this.WinIcon.Text != "")
cstr+="/win32icon:""+this.WinIcon.Text+"" ";
if (this.References.Text != "")
cstr+="/r:"+this.References.Text+" ";
cstr+="/optimize"+bools[CodeOpt.SelectedIndex]+" /unsafe"+bools[UnsafeCode.SelectedIndex];
System.Diagnostics.Process pc = System.Diagnostics.Process.Start(@"C:\windows\Microsoft.Net\Framework\v1.1.4322\csc.exe",cstr);