-1

I have a simple console application written in C#. I want to use its .exe file to run it from SqlServer Agent jon(CmdExec).

I build the application to get the .exe file and now I'm confused about the two folders bin and obj. Both of the folders contain Debug and Release folders and inside there is exe.

Can you advice me, which one is the .exe file I should use for production?

Thanks

Sudip Thapa
  • 33
  • 1
  • 7
  • 2
    The one in the bin folder, the obj folder is there for compilation purposes. See http://stackoverflow.com/questions/233081/whats-the-obj-directory-for-in-net – Ron Beyer Aug 26 '15 at 13:46
  • If in Visual Studio's menu you go to Build/Configuration Manager you can see the Active Solution Configuration. By default is set to Debug, which means the Debug filder is being used. If you change it to Release then the exe files will be added to the Release folder. – Hugo Nava Kopp Aug 26 '15 at 13:49
  • Thank you Hugo Ron Beyer/Nava Kopp for you kind information. – Sudip Thapa Aug 26 '15 at 13:51
  • In Visual Studio, make sure you have the solution configuraton set to "Release" (you don't want to use "Debug" builds in production). Then build your solution. After that, you can use the .exe in `\bin\Release`. Another (better?) way would be to *publish* your solution. This has the nice effect that it neatly packs everything you need (to install your application) into a folder of your choosing. – Corak Aug 26 '15 at 13:51

2 Answers2

3

You'll want to use the one in the bin folder. Give this a read:

What are the obj and bin folders (created by Visual Studio) used for?

Community
  • 1
  • 1
Jonathan Carroll
  • 880
  • 1
  • 5
  • 20
1

You should use the one in the bin folder.

The obj folder is used to store intermediate files during compilation.

Markus
  • 767
  • 2
  • 7
  • 19