Why are my binaries not placed in the /bin/release folder when I build a Windows Service in C#?

房东的猫 提交于 2019-12-02 20:15:34
Shekhar_Pro

Most likely, you are only configuring the Release build, not actually building the project in Release mode.

Simply select "Release" mode from the drop down box in the toolbar, as shown in pic below:

or you can do the same thing from your project's Properties:

Then when you will build the project (Ctrl+Shift+B), it will build in Release mode and place the output in the folder you have configured in Project properties. (Usually this is bin/release.)

If you still don't see files in the release folder then as suggested by Gishu in the comments, check the Output Window while the build is in progress to see where the binaries are actually being created.

I witnessed the same problem.Even when I had the configuration as Release as shown above,VS will some how ignore it and as I can see from the output window,it puts it in the Debug folder.

Trick that worked for me: 1] Go to Build Tab on VS. 2] Click Configuration manager. 3] Under the drop down both at active solution configuration and the project specific configuration, select release. 4] Check the project properties just to make sure. Then build it.I the release folder the required files.

Accept the answer if it helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!