I need to rename published binary files in an ASP.NET Core application. For example, the files in the published folder are:
WebApplication1.exe
WebApplication1.dll
WebApplication1.deps.json
WebApplication1.pdb
WebApplication1.runtimeconfig.json
etc.
I need to rename WebApplication1 to WebApplication2 after the files are published. If I just manually rename the files to WebApplication2.exe, etc., I get an error like:
The managed DLL bound to this executable: 'WebApplication1.dll', did not match own name 'WebApplication2.dll'.
I also tried to rename WebApplication1 to WebApplication2 inside of WebApplication1.deps.json with no luck.