-1

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...

GumGun
  • 15
  • 1
  • 1
  • 5

2 Answers2

1

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("")]
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
0

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 .

srsyogesh
  • 609
  • 5
  • 17
  • I want to add the creation date,file version,description etc to the output of the compiled source code (.exe)... – GumGun Jun 14 '13 at 15:30
  • This info should be part of assembly common info.cs in a normal assembly , you can create this info in any source file and compile the assembly . – srsyogesh Jun 17 '13 at 06:48