Josh
Josh

Reputation: 450

How can I configure visual studio to produce a c# executable with a .dll extension

I have two projects in my solution, the second produces an executable of type 'Windows Application' with a Startup Object defined. I don't want the exe file this project produces to sit in the same directory as my application called 'whatever.exe', I want to rename it to 'whatever.dll', since the user is not intended to run this application manually (in the first process I call Process.Start() with this file as the target - as long as the PE header identifies it as an executable file windows can execute it just fine).

I can simply manually rename the output of the second project to .dll, even automate it in a post build step, but is there a way instead to create a project of type 'Class Library' and define a Startup Object for it?

Upvotes: 1

Views: 139

Answers (1)

Tim Lloyd
Tim Lloyd

Reputation: 38434

Visual Studio cannot be specifically configured to give exe projects an extension other than "exe" (you have already mentioned a post-build step, but this is not direct).

Upvotes: 1

Related Questions