Pregunta

Hello Guys I want to know how to add some File Properties (file creation date, description, file version etc...) to the output of the compiled code.

I already know how to add an Icon :

param.CompilerOptions += "/target:winexe" + " " + "/win32icon:" + "\"" + textBox1.Text + "\"";

I also read the MSDN documents,but they dont teach/show me how to do this...

¿Fue útil?

Solución

I think you just do it the same way you would do it with a normal complied assembly, just add the assembly attributes in one of the source files that is being complied using codedom to set your properties

[assembly: AssemblyTitle("SampleProject")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("SampleProject")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Otros consejos

Not sure what is the file property you are talking about . If you are looking at compiling any code via code take a look at the type System.CodeDom.Compiler.CompilerParameters or if you are looking to compile using the csharp compiler csc.exe then take a look at http://msdn.microsoft.com/en-us/library/6ds95cz0%28v=vs.71%29.aspx .

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top