Do I need to set /target for a .NET service application?

G

Guest

I use csc to build my applications (makefile as opposed to using Visual
Studio). I recently noticed a problem because I had forgot to specify
/target:winexe for a GUI application. As a result when you ran the
executable it would launch a command window that stuck around for the life of
the GUI. If you closed the command window the GUI would close. Adding
/target:winexe fixed that problem.

I have two other executables I create. However, these are both Windows
services. I'm not specifying /target for those either so they are getting
the default of exe (console application). Is this a problem? I checked task
manager on the machine where these services are running and I don't see any
command processors running. What should the /target setting be for .NET
Windows Services?
--
Thanks,
Nick

(e-mail address removed)
remove "nospam" change community. to msn.com
 
S

Steven Cheng[MSFT]

Hi Nick,

As for windows service application, I think you can specify either "exe" or
"winexe" as it execute in a non-interactive logon session. And windows
service natively does support two kind of subsystems, "CONSOLE" and
"WINDOWS", for normal scenario, it won't matter much which one you choose.

BTW, if you use Visual Studio to create a windows service project, it by
default use "Windows Application" output type, I think you can also set
this one so as to conform with built-in project setting.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top