Is it possible to set the OriginalFilename property for .NET assembly using Visual Studio?

My understanding (which may well be wrong) is that it is easy to set the OriginalFilename property for a C ++ DLL or EXE by including the VERSIONINFO resource file in the Visual Studio assembly.

But I can not find a way to install OriginalFilename to build C #. Apparently, the name of the generated output file is always set.

I would really like to point this out, if possible. Any ideas? Thanks.

+4
source share
3 answers

OK, there are no answers, and now I have found a workaround.

This article here at StackOverflow was very helpful: How to set version information for an existing .exe, .dll?

What led me to this resource manipulation project written in C #: http://resourcelib.codeplex.com/

So what I'm going to do is to modify the DLLs after they are created.

Edit (March 2015): This is an old post, but I see that there is still interest in it. The open-source ResourceLib C # File Resource Management Library project has moved from four years ago and is now here: https://github.com/dblock/resourcelib

+2
source

Yes, you can install it, -> right-click the name of the project or assembly in visual studio β†’ select properties β†’ select the β€œApplication” tab β†’ change the assembly name as you want .

Refer to the link to view the properties window, which has an assembly name option

After changing the name, compile the project (to check the change), right-click on your compiled DLL file and select the properties and click on the " Details " tab, in which you can see the " original filename 'is now changed.

+1
source

Unfortunately not.

You can read what it is with System.Diagnostics.FileVersionInfo.OriginalFilename , but the value is populated by Project / Output Filename not from any assembly assembler.

Running the patch program to change it after assembly leads to the risk of breaking any digital signature used during assembly. You may need to build without a signature, correct the attributes, and then sign them in a separate step.

0
source

All Articles