{"id":20218279,"url":"https://github.com/z3ut/wix-toolset-net-core-service-example","last_synced_at":"2025-09-04T03:33:41.751Z","repository":{"id":143942518,"uuid":"208282577","full_name":"z3ut/wix-toolset-net-core-service-example","owner":"z3ut","description":"WiX toolset .NET Core service installation example","archived":false,"fork":false,"pushed_at":"2019-09-13T14:36:22.000Z","size":47,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T16:09:22.461Z","etag":null,"topics":["net-core","windows-service","wix","wix-toolset"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/z3ut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-13T14:35:57.000Z","updated_at":"2025-02-24T20:46:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"25e817e9-b29c-485c-ad9f-d2911dccea97","html_url":"https://github.com/z3ut/wix-toolset-net-core-service-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/z3ut/wix-toolset-net-core-service-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z3ut%2Fwix-toolset-net-core-service-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z3ut%2Fwix-toolset-net-core-service-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z3ut%2Fwix-toolset-net-core-service-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z3ut%2Fwix-toolset-net-core-service-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z3ut","download_url":"https://codeload.github.com/z3ut/wix-toolset-net-core-service-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z3ut%2Fwix-toolset-net-core-service-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273547566,"owners_count":25125089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["net-core","windows-service","wix","wix-toolset"],"created_at":"2024-11-14T06:37:53.507Z","updated_at":"2025-09-04T03:33:41.743Z","avatar_url":"https://github.com/z3ut.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WiX Toolset .NET Core service example\n\nWiX toolset .NET Core service installation example\n\n## Description\n\nCreation of .NET Core 2.2 windows service msi installation file with WiX 3.11.\n\n## Steps to setup installation project\n\n* Be sure that your project can be installed and started as service with sc.exe\n\n* In service project add runtime win10-x64 in .csproj\n\n```\n\u003cPropertyGroup\u003e\n  ...\n  \u003cRuntimeIdentifier\u003ewin10-x64\u003c/RuntimeIdentifier\u003e\n\u003c/PropertyGroup\u003e\n```\n\n* Install WiX with VS extension\n\n* Add new \"Setup Project for WiX v3\" project in solution\n\n* Add reference to service project in new WiX project: right click on WiX project -\u003e Add -\u003e Reference -\u003e Tab Projects -\u003e Select and add your service project.\n\n* Edit .wixproj file in WiX project to add Heat copying\n\n```\n\u003cTarget Name=\"BeforeBuild\"\u003e\n  \u003cExec Command=\"dotnet publish ..\\WiXToolsetNetCoreService\\WiXToolsetNetCoreService.csproj -c $(Configuration) -r win10-x64\" /\u003e\n  \u003cPropertyGroup\u003e\n    \u003cLinkerBaseInputPaths\u003e..\\WiXToolsetNetCoreService\\bin\\$(Configuration)\\netcoreapp2.2\\win10-x64\\publish\u003c/LinkerBaseInputPaths\u003e\n    \u003cDefineConstants\u003eBasePath=..\\WiXToolsetNetCoreService\\bin\\$(Configuration)\\netcoreapp2.2\\win10-x64\\publish\u003c/DefineConstants\u003e\n  \u003c/PropertyGroup\u003e\n  \u003cHeatDirectory OutputFile=\"WiXToolsetNetCoreService.wxs\" DirectoryRefId=\"INSTALLFOLDER\" ComponentGroupName=\"WiXToolsetNetCoreServiceProject\"\n    SuppressCom=\"true\" Directory=\"..\\WiXToolsetNetCoreService\\bin\\$(Configuration)\\netcoreapp2.2\\win10-x64\\publish\" SuppressFragments=\"true\"\n    SuppressRegistry=\"true\" SuppressRootDirectory=\"true\" AutoGenerateGuids=\"false\" GenerateGuidsNow=\"true\" ToolPath=\"$(WixToolPath)\" PreprocessorVariable=\"var.BasePath\" /\u003e\n\u003c/Target\u003e\n```\n\n* Fill Manufacturer attribute for Product in Product.wxs in WiX project\n\n* Build WiX project\n\n* Add WiXToolsetNetCoreService.wxs (Heat-henerated file references) to WiX Project in Visual Studio (Add existing item)\n\n* Add reference to WiXToolsetNetCoreService.wxs in Product.wxs\n\n```\n\u003cFeature Id=\"ProductFeature\" Title=\"SetupProject\" Level=\"1\"\u003e\n  \u003c!-- heat references --\u003e\n  \u003cComponentGroupRef Id=\"WiXToolsetNetCoreServiceProject\" /\u003e\n\n  \u003cComponentGroupRef Id=\"ProductComponents\" /\u003e\n\u003c/Feature\u003e\n```\n\n* Add service registration in Product.wxs\n\n```\n\u003cFragment\u003e\n  \u003cComponentGroup Id=\"ProductComponents\" Directory=\"INSTALLFOLDER\"\u003e\n\n    \u003c!-- service registration --\u003e\n    \u003cComponent Id=\"ProductComponent\" \u003e\n      \u003cFile Id=\"JobServiceEXE\"\n            Name=\"WiXToolsetNetCoreService.exe\"\n            DiskId=\"1\"\n            Source=\"$(var.WiXToolsetNetCoreService.TargetDir)\\WiXToolsetNetCoreService.exe\"\n            Vital=\"yes\"\n            KeyPath=\"yes\" /\u003e\n\n      \u003cServiceInstall Id=\"ServiceInstaller\"\n                      Type=\"ownProcess\"\n                      Vital=\"yes\"\n                      Name=\"WiXToolsetNetCoreService\"\n                      DisplayName=\"WiX Toolset .NET Core Service\"\n                      Description=\"Example for installing .NET Core service with WiX toolset\"\n                      Start=\"auto\"\n                      Account=\"LocalSystem\"\n                      ErrorControl=\"normal\" /\u003e\n\n      \u003cServiceControl Id=\"StartService\"\n                      Name=\"WiXToolsetNetCoreService\"\n                      Start=\"install\"\n                      Wait=\"no\" /\u003e\n      \u003cServiceControl Id=\"StopService\"\n                      Name=\"WiXToolsetNetCoreService\"\n                      Stop=\"uninstall\"\n                      Remove=\"uninstall\"\n                      Wait=\"yes\" /\u003e\n    \u003c/Component\u003e\n\n  \u003c/ComponentGroup\u003e\n\u003c/Fragment\u003e\n```\n\n* Open WiX project properties -\u003e 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.\n\nAfter 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz3ut%2Fwix-toolset-net-core-service-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz3ut%2Fwix-toolset-net-core-service-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz3ut%2Fwix-toolset-net-core-service-example/lists"}