0
votes

What is the appropriate way/How to package a Visual Basic Windows Service Project?

I have a Visual Basic Windows Service (.Net Framework) project. Jenkins build the project using msbuild. I need to package the compiled codes (.dlls, .exe, etc.) to be pushed to our deployment tool.

Is there a packaging option for Windows Service project in Visual Studio 2017/2019? Something like with ASP.Net Web Application project that can be package using Publish that creates a Web Deployment Package? The Setup Project is not an option as I am only using BuildTools in my build server and .vdproj is unable to build using msbuild.

1

1 Answers

0
votes

As far as I know, the best way to package a .NET Framework Windows Service project codebase is using MSI (installer) because it's not part of any web deployment at all. Also .NET Framework Windows Service project template is language agnostics as long as it's using .NET Framework, this means is not just supporting both VB.NET and C# so it's not coupled to VB/C#, you can also create the Windows Service using Managed C++.

To create a MSI deployment of the Windows Service project, you could use extensions.

On Visual Studio 2017, you can use an extension, the Visual Studio 2017 installer project: https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects

Or you could use open source WiX installer extension (also based on MSI) for VS 2017: https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension

If you are using .NET Core 3.0, you can use the ASP.NET Core template to create worker process on top of ASP.NET Core 3.0 framework, and deploy as Windows Service. Unfortunately, the publish web UX and UI is not available yet and this template only support C#.