Getting assembly name

C#’s exception class has a source property which is set to the name of the assembly by default. Is there another way to get this exact string (without parsing a different string)? I have tried the following: catch(Exception e) { string str = e.Source; //”EPA” – what I want str = System.Reflection.Assembly.GetExecutingAssembly().FullName; //”EPA, Version=1.0.0.0, Culture=neutral, … Read more

Equivalent to AssemblyInfo in dotnet core/csproj

Since dotnet core moved back to the .csproj format, there is a new autogenerated MyProject.AssemblyInfo.cs which contains, among others: [assembly: AssemblyCompany(“MyProject”)] [assembly: AssemblyVersion(“1.0.0.0”)] Note that this is automatically regenerated every build. Previously, the file was found in the /obj/ directory, now it appears to be only in memory as the file can’t be found on … Read more

Can I automatically increment the file build version when using Visual Studio?

I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005). If I look up the properties of say C:\Windows\notepad.exe, the Version tab gives “File version: 5.1.2600.2180”. I would like to get these cool numbers in the version of my dll’s too, not version 1.0.0.0, which … Read more