今天写了一个windows service程序, 本身这个程序是一个console application, 但是不能够通过F5直接运行, 会出现下面图片所示的错误:

提示说需要安装一个Instalutil.exe程序, 网上搜索了这个程序, 属于net framework中的一个自带的工具

1、打开运行 输入 cmd,按回车,输入cd C:\Windows\Microsoft.NET\Framework\v4.0.30319,回车,然后输入InstallUtil.exe 运行该程序,运行之后会有一些介绍

2、输入 InstallUtil 后面输入你要安装的程序服务路径包括程序的全名,如:F:\flight\blanceService\blanceService.exe  回车

附上我运行之后的效果图:

此时在该程序所在的exe文件夹处执行cmd命令,

该程序会被运行.在程序管理器中可以看到这个程序.

Windows Service application 初步探索的更多相关文章

  1. Window服务程序(windows service application)如何调试

    服务程序不能通过常规的按F5或F11的方式来进行调试和运行,也无法立即运行一个服务或逐步调试它的代码. 因此,你必须安装并启动你的服务,然后附属(attach)一个Debugger到这个服务的进程上.

  2. 如何利用mono把.net windows service程序迁移到linux上

    How to migrate a .NET Windows Service application to Linux using mono? 写在最前:之所以用要把windows程序迁移到Linux上 ...

  3. A basic Windows service in C++ (CppWindowsService)

    A basic Windows service in C++ (CppWindowsService) This code sample demonstrates creating a basic Wi ...

  4. [Windows Azure] Building worker role B (email sender) for the Windows Azure Email Service application - 5 of 5.

    Building worker role B (email sender) for the Windows Azure Email Service application - 5 of 5. This ...

  5. [Windows Azure] Building worker role A (email scheduler) for the Windows Azure Email Service application - 4 of 5.

    Building worker role A (email scheduler) for the Windows Azure Email Service application - 4 of 5. T ...

  6. [Windows Azure] Building the web role for the Windows Azure Email Service application - 3 of 5

    Building the web role for the Windows Azure Email Service application - 3 of 5. This is the third tu ...

  7. [Windows Azure] Configuring and Deploying the Windows Azure Email Service application - 2 of 5

    Configuring and Deploying the Windows Azure Email Service application - 2 of 5 This is the second tu ...

  8. 如何托管ASP.NET Core应用到Windows Service中

    (此文章同时发表在本人微信公众号"dotNET开发经验谈",欢迎右边二维码来关注.) 题记:正在构思一个中间件的设计,考虑是否既可以使用最新的技术,也可以兼顾传统的部署模式.所以有 ...

  9. NoSQL初探之人人都爱Redis:(4)Redis主从复制架构初步探索

    一.主从复制架构简介 通过前面几篇的介绍中,我们都是在单机上使用Redis进行相关的实践操作,从本篇起,我们将初步探索一下Redis的集群,而集群中最经典的架构便是主从复制架构.那么,我们首先来了解一 ...

随机推荐

  1. 常对象与this指针

    [1]示例代码 用代码说事,比较靠谱.请看下例: #include <QDebug> #include <QString> class Person { public: Per ...

  2. 转:【专题五】TCP编程

    前言 前面专题的例子都是基于应用层上的HTTP协议的介绍, 现在本专题来介绍下传输层协议——TCP协议,主要介绍下TCP协议的工作过程和基于TCP协议的一个简单的通信程序,下面就开始本专题的正文了. ...

  3. 新浪微博 [异常问题] 414 Request-URL Too Large

    新浪微博 [异常问题] 414 Request-URL Too Large 浏览器上打开新浪微博,或则日志是返回结果提示:414 Request-URL Too Large原因:因同IP访问微博页面过 ...

  4. 实例,C# 导出.dbf格式文件

     using System; using System.Collections using System.Configuration; using System.Data; using System. ...

  5. 浏览器从输入URL到页面加载显示完成全过程解析

    一 浏览器查找域名对应的 IP 地址(域名解析的过程,先进行缓存的查看): 1.在浏览器中输入www.qq.com域名,操作系统会先检查自己本地的hosts文件是否有这个网址映射关系,如果有,就先调用 ...

  6. Mysql初级第一天(wangyun)

    SQL Structure Query Language 结构化查询语言 数据库DataBase 产品: 1:小型数据库 Ms Acssess (Office) SQLite 移动设备 2:中型数据库 ...

  7. 2019/3/26 wen 数组

  8. Eloquent JavaScript #02# program_structure

    第一章中作者介绍了各种值,但是这些独立的值是没有意义的,只有当值放在更大的框架的时候才会彰显它们的价值.所以第二章开始介绍程序结构. 1.var VS. let 以及 const 作者推荐用 let ...

  9. Docker学习笔记之镜像与容器

    0x00 概述 镜像和容器作为 Docker 里最基础的概念,我们很有必要了解 Docker 对它们的很多定义以及其他与它们有关的知识.在这一小节里,我们就专门针对镜像与容器两个概念展开,细致的梳理与 ...

  10. Vue基础进阶 之 计算属性的使用

    计算属性的基本使用 初始小示例: 代码: window.onload = () =>{ new Vue({ el:'div', data:{ msg:'' } }) } </script& ...