An open API service indexing awesome lists of open source software.

https://github.com/z3ut/wix-toolset-net-core-service-example

WiX toolset .NET Core service installation example
https://github.com/z3ut/wix-toolset-net-core-service-example

net-core windows-service wix wix-toolset

Last synced: 11 months ago
JSON representation

WiX toolset .NET Core service installation example

Awesome Lists containing this project

README

          

# WiX Toolset .NET Core service example

WiX toolset .NET Core service installation example

## Description

Creation of .NET Core 2.2 windows service msi installation file with WiX 3.11.

## Steps to setup installation project

* Be sure that your project can be installed and started as service with sc.exe

* In service project add runtime win10-x64 in .csproj

```

...
win10-x64

```

* Install WiX with VS extension

* Add new "Setup Project for WiX v3" project in solution

* Add reference to service project in new WiX project: right click on WiX project -> Add -> Reference -> Tab Projects -> Select and add your service project.

* Edit .wixproj file in WiX project to add Heat copying

```



..\WiXToolsetNetCoreService\bin\$(Configuration)\netcoreapp2.2\win10-x64\publish
BasePath=..\WiXToolsetNetCoreService\bin\$(Configuration)\netcoreapp2.2\win10-x64\publish

```

* Fill Manufacturer attribute for Product in Product.wxs in WiX project

* Build WiX project

* Add WiXToolsetNetCoreService.wxs (Heat-henerated file references) to WiX Project in Visual Studio (Add existing item)

* Add reference to WiXToolsetNetCoreService.wxs in Product.wxs

```


```

* Add service registration in Product.wxs

```





```

* Open WiX project properties -> Tool Settings and add ICE30 in field "Suppress specific ICE validation" for all configurations (Debug\Release). This step suppress error about two references to .exe file by Heat config and service installer.

After this you can try to build WiX project and run .msi installation file. The service should be installed in ProgramFilesFolder (c:\Program Files (x86)) and registered in Services.