CodeDOM and assembly version

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
 
G

Guest

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))}));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top