123456789101112131415 |
- 1、发布程序
- 2、将发布文件中找到 CmdBat 文件夹
- 3、找到 CmdBat 中得 InstallWindowsServiceCmd.bat 文件
- 4、修改 InstallWindowsServiceCmd.bat 文件代码 set serviceFilePath=这里写入你发布好的项目文件路径
- 5、例如 set serviceFilePath = D:\Projects\HZY.Quartz\HZY.Quartz.exe
- 6、然后 运行 InstallWindowsServiceCmd.bat 文件
- 7、UnstallWindowsServiceCmd.bat 执行文件可以卸载 windows 项目服务
- 8、修改程序启动端口 在项目中 Program.cs 文件下 options.ListenAnyIP(5200, configure => configure.Protocols = HttpProtocols.Http1); 找到这块代码可以修改端口
|