Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start service with a .Net Core 3.0 single file exe #129

Open
nologinatgit opened this issue Oct 15, 2019 · 0 comments
Open

How to start service with a .Net Core 3.0 single file exe #129

nologinatgit opened this issue Oct 15, 2019 · 0 comments

Comments

@nologinatgit
Copy link

nologinatgit commented Oct 15, 2019

I have created an ASP.NET Core 3.0 project and start it as a Windows service with your library. When I choose the conventional publishing in the Windows service project, it creates nearly 500 files and it can be started with this library and it serves the requests using the proper URLs.

However, when I choose the single exe as the publishing form, I get 1 file that is 175+ MB in size:

    <LangVersion>latest</LangVersion>
    <PublishReadyToRun>false</PublishReadyToRun>
    <PublishSingleFile>true</PublishSingleFile>
    <RuntimeIdentifier>win-x86</RuntimeIdentifier>

When I simply start it, I can see the following:

Starting up as a console service host
The ... service is now running, press Control+C to exit.

Unfortunately, I can't see any OnStart, OnStop or OnError message in the log file.

Can I somehow use the single exe format and run it as a service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant