CodeDOM and assembly version

  • Thread starter Thread starter Bragadiru
  • Start date Start date
B

Bragadiru

Hi,

I can compile dinamically with CodeDOM, but all the dlls have 0.0.0.0
version. How can I set it ??

Thanks for any advice
 
You need to add the "System.Reflection.AssemblyVersion" attribute to your
CodeCompileUnit (Assembly)...

CodeCompileUnit ccuAssembly = new CodeCompileUnit();
string assemblyVersion = "1.0.0.0";

ccuAssembly.AssemblyCustomAttributes.Add(new
CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new
CodeAttributeArgument[] {new CodeAttributeArgument(new
CodePrimitiveExpression(assemblyVersion))}));
 
Back
Top