今天写了一个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. url组成

  2. 【Elasticsearch学习之二】Elasticsearch Rest风格操作

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 elasticsearch-2.2.0 一.Rest简介Re ...

  3. 用django统计代码行数+注释行数

    实现统计代码行数: 1.首先在url.py中配置 from django.conf.urls import url from django.contrib import admin from app0 ...

  4. python 修改xml文档 ing

    原xml文件 <?xml version="1.0" encoding="utf-8"?> <catalog> <maxid> ...

  5. vue-cli项目npm run build后,index.html无法在浏览器打开

  6. 【JavaScript 6连载】二、函数(工厂模式)

    <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"& ...

  7. [转载]图解程序员必须掌握的Java常用8大排序算法

    这篇文章主要介绍了Java如何实现八个常用的排序算法:插入排序.冒泡排序.选择排序.希尔排序 .快速排序.归并排序.堆排序和LST基数排序,分享给大家一起学习. 分类1)插入排序(直接插入排序.希尔排 ...

  8. MySQL性能测试工具sysbench的安装和使用

    sysbench是一个开源的.模块化的.跨平台的多线程性能测试工具,可以用来进行CPU.内存.磁盘I/O.线程.数据库的性能测试.目前支持的数据库有MySQL.Oracle和PostgreSQL.当前 ...

  9. Linux 执行文本保存报错 是使用了记事本等工具打开之后导致的

    dos2unix xx.bat    格式化下就好了 安装: yum install -y dos2unix

  10. js 迭代方法

    迭代方法 * every():对数组中的每一项运行给定函数,如果该函数对每一项都返回true,则返回true. * filter():对数组中的每一项运行给定函数,返回该函数会返回true 的项组成的 ...