sâmbătă, 21 octombrie 2017

How to create a Windows Service Project in Visual Studio

http://bit.do/dQ2Ji Secret discount page at Wcfstorm.
it's time to create your 1st Windows Service project and we'll fire up Visual Studio Visual Studio 2015 Enterprise is up, I'll click 'File' menu and select 'New', and then 'Project' Expand Visual C sharp Expand Windows Click 'Classic Desktop' Look for Windows Service and select it Name of solution will be 'Udemy Windows Service' When we create a new Windows Service project, Service1.cs file is opened by default We can see that this file is opened in design view The code of our Windows Service is going to reside inside this file First of all, I will like to change the name of this file In solution explorer, right click the file 'Service1.cs' Select menu option 'Rename' I will change the name to UdemyWindowsService.cs VS will ask if you want to rename all references of this service, click Yes There is another file 'Program.cs' in the solution explorer files hierarchy, don't worry about it. Double click on UdemyWindowsService.cs Now click inside the designer area On the properties panel, change property 'ServiceName' to 'Udemy Windows Service' Build the project Ctrl+Shift+B I hope you remember that we can't run a Windows Service without installing it In the next video, I will tell you how to solve this problem.

Niciun comentariu:

Trimiteți un comentariu