dir.by  
  Search  
Programming, development, testing
Windows Service (using C#)
Doing publish a project (compiling and assembling a project) "C# Windows Service" | library .NET Core using Worker
  Looked at 1539 times    
 Doing publish a project (compiling and assembling a project) "C# Windows Service" | library .NET Core using Worker 
last updated: 16 April 2023
Step 1. Open Visual Studio
If you do not have Visual Studio installed you need install Visual Studio...
Open Visual Studio 2022
or
Open Visual Studio 2019
Step 2. Open a project in Visual Studio
Open a project in Visual Studio.
If there is no project, then create new project C# Windows Service (.NET Core, worker)...
Step 3. We make publish the project (compile and assemble the project)
On the project, right-click.
In the menu, click Publish.
Choose where we will compile the project:
Azure (this is a remote server)
Docker (this is a container used for testing)
Folder (this means a folder on your computer)
Profile (use old settings)
 
Select any folder. I compile and assemble the project into a folder:
D:/MyWorkerServiceCore1/publish
 
Click Publish to compile and build the project:
Step 4. The project is ready, look at the files and run
Here are the files created:
 
Run the file: MyWorkerServiceCore1.exe
We'll see:
 
Note!
We make publish the project, i.e. compile and build the project.
A exe file and other files have been created.
Now we will register the exe file in the system and run it as Windows Service...
 
← Previous topic
How to open a Notepad app from C# Windows Service | library .NET Core and use Worker
 
Next topic →
How to register your exe file as Windows Service. Start/stop your Windows Service on the system Windows | library .NET Core using Worker
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
Technology .NET Framework
Create a new application C# Windows Service (.NET Framework)
C# Windows Service (.NET Framework) with the username. Event when user logs in/out of Windows
Create folder "My Application" under folder "Application and Services logs" | Event Viewer
Technology .NET Core
Create a new application C# Windows Service (library .NET Core and use Worker)
Loading parameters from appsettings.json for application C# Windows Service (library .NET Core and using Worker)
How to open a Notepad app from C# Windows Service | library .NET Core and use Worker
Doing publish a project (compiling and assembling a project) "C# Windows Service" | library .NET Core using Worker
How to register your exe file as Windows Service. Start/stop your Windows Service on the system Windows | library .NET Core using Worker

  Ваши вопросы присылайте по почте: info@dir.by  
Яндекс.Метрика