Reading the Version number from a AssemblyInfo.cs file

Reading the Version number from a AssemblyInfo.cs file

I'm trying to extract the version number from a AssemblyInfo.cs file! And I'm trying to use&nbsp;<code>System.Reflection.Assembly.LoadFile(path);</code>&nbsp;But while doing this I get a BadImageFormatException;&nbsp;<em>"The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)"</em>. So now I wounder, is that not a possible way to go about it? And should I use RegEx instead?

I'm trying to extract the version number from a AssemblyInfo.cs file! And I'm trying to use System.Reflection.Assembly.LoadFile(path); But while doing this I get a BadImageFormatException; "The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)". So now I wounder, is that not a possible way to go about it? And should I use RegEx instead?

I have read many examples with GetExecutingAssembly() but I do want to get the version from an other project.

Clarification: I want to read the version info from the AssemblyInfo.cs file! And not from a compiled file. I'm trying to make a tool to update my version numbers before I make a new release.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

C/C++ vs. Rust: A developer’s perspective

In this post, you'll see the difference between Rust and C/C++ in a developer’s perspective

Variable Introduction in C#[Bangla]

LIKE | COMMENT | SHARE | SUBSCRIBE A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C# has a speci...