开发者

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

I am new to C# and VS 2010, and am following an online guide to creating a C# Windows Service in Visual Studio 2010.

When I try and build the application however, I don't get any files created under the /bin/release folder.

I do get files under the /bin/Debug folder.

I have tried all the build configurations e.g Active, DEBUG, Release, All but nothing changes.

I have tried closing the solution down and restarting etc.

I have also experienced this same problem on a number of other projects which h开发者_如何学Pythonave been C# console apps.

The /bin/release folder exists (as I had to create it by hand) and I have checked the output path in the properties tab to ensure the release configuration is targeted to that folder.

I asked our "C# guru" at work and he didn't have a clue. Does anyone know what could be causing this?


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:

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

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

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

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜