I am trying to extract the version number from AssemblyInfo.cs! And I'm trying to use. System.Reflection.Assembly.LoadFile(path);But in doing so, I get a BadImageFormatException exception; "The module is expected to contain an assembly manifest (exception to HRESULT: 0x80131018)." So, now I realized that this is not a possible way to do this? And should I use RegEx instead?
I have read many examples from GetExecutingAssembly(), but want to get a version from another project.
Clarification: I want to read version information from the AssemblyInfo.cs file ! And not from a compiled file. I am trying to make a tool to update my version numbers before I make a new version.
source
share