1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
CompilerParameters Parametres = new CompilerParameters();
Parametres.GenerateExecutable = true;
Parametres.OutputAssembly = "bound.exe";
Parametres.CompilerOptions = "/target:winexe";
Parametres.EmbeddedResources.Add("files.resources");
Parametres.ReferencedAssemblies.Add("System.dll");
// Ajout d'une icone
string ICO = Path.GetTempPath() + "monIcone2.ico";
if (!string.IsNullOrEmpty(pathIcone))
{
File.Copy(pathIcone, ICO);
// SANS CETTE LIGNE SA FONCTIONNE //
Parametres.CompilerOptions += "/win32icon:" + ICO;
} |