Inno Setup Preprocessor Tip for .NET Developers

I love ISPP because it really makes things easier. But .NET sometimes brings differences. For example, 

   1: #define MyAppVersion GetFileVersion("..\bin\release\Lextm.CodeBeautifierCollection.Framework.dll")

Because my assembly is .NET and I forget to set AssemblyFileVersion attribute in code, MyAppVersion is empty! How dangerous! That’s why GrapeVine M4 and M5 installers does not save version information into registry.

Generally speaking, for .NET assemblies, AssemblyVersion is more common. You just need to specify AssemblyFileVersion so as to make them similar to Win32 DLLs.

I’d like to make AssemblyVersion equal to AssemblyFileVersion. However, if you take a look at CodeGear RAD Studio assemblies, you may find something different.

Be Sociable, Share!

2 thoughts on “Inno Setup Preprocessor Tip for .NET Developers