views:

31

answers:

1

I have a method that creates a DLL from a .cs file that is based on the code found here on MSDN.

Using that code, is there any way to specify the version number of the DLL that gets generated? Right now it's always 0.0.0.0. I can't find a property or constructor that I can call to specify the version number.

+2  A: 

Since you are compiling from a source file, have you tried just adding the Reflection namespace and the version attributes to the top of your .cs file before compiling it?

using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Mikael Svenson
Thanks, that worked.
Brandon