摘要:
1. 在项目中引用NLog.dll2. 在项目中添加一个NLog.config配置文件 3. 在项目中添加一个LogHelper类using System;using System.Collections.Generic;using ... 阅读全文
摘要:
两种方法:1. 安装Service,然后将VS附加到该Service进行调试。2.修改Program.cs文件。 1 namespace MyProject.Service 2 { 3 static class Program 4 { 5 /// 6 ... 阅读全文
摘要:
有两种方法:1. 在VS2010及以下版本中首先在设计视图中打开service主程序文件,点击右键选择“Add Installer”添加完ProjectInstaller后设置相应属性一般设置如下:设置serviceInstaller1组件的属性: 1) ServiceName = 服务名称 2... 阅读全文