virty
virty

Reputation: 199

How to change assembly name in Visual Studio?

I need to rename assembly name of DLL, after every compile, by adds increment to base name. For example

1 compile: Assembly name - basename1.dll
2 compile: Assembly name - basename2.dll
n compile: Assembly name - basenamen.dll

I cant just rename a file, because dll contains some meta information about its name. How can i do it automatically after every recompile?

I use Visual studio 2013,c#

Upvotes: 0

Views: 8990

Answers (1)

matthijsb
matthijsb

Reputation: 909

You can add a post build step in your project properties, something like this:

rename "$(TargetPath)" "newname.dll"

If you want to add more specific information about the file, then you can create a powershell script that reads the AssemblyInfo and adds that to the file name

Upvotes: 0

Related Questions