Amit Bisht
Amit Bisht

Reputation: 5136

Does windows service require .Net Runtime

I'm creating a windows service in c# .net, and want to deploy it into a system where i don't have .net runtime.
My question is that is that service works without having .net runtime? if no then how it work without having a runtime?

Upvotes: 3

Views: 920

Answers (3)

CodeCaster
CodeCaster

Reputation: 151594

A Windows Service is just an executable that responds to certain calls by the Service Control Manager.

So if you program the service's executable to run on .NET, the machine running the service has to have the .NET runtime installed.

The only alternative to having to install or embed/self-host the .NET runtime would be to not use .NET.

Upvotes: 8

Rahul Tripathi
Rahul Tripathi

Reputation: 172448

Yes you need to have the .Net framework as the libraries and references used in the .net windows service might need the framework.

if no then how it work without having a runtime?

You need to install the .Net framework on your system else there is no option to use the windows service on your system.

Upvotes: 1

Oscar
Oscar

Reputation: 13960

You need the .Net runtime for this. Otherwise, you'll have to write your code from scratch using c++ (Not managed c++)

Upvotes: 3

Related Questions