我在visual studio 2013中使用c#創建了一個窗口服務。 Windows服務正常工作。執行使用Visual Studio創建的* .msi文件時出錯
當我創建一個安裝項目,並運行在不同的計算機.msi文件它給了我一個錯誤
步驟我做:
1.右鍵單擊解決方案 - >其他項目類型 - > Visual Studio安裝程序 - 設置項目
2.添加名稱文件系統編輯器 - >選擇應用程序文件夾 - >右鍵單擊 - >添加 - >項目輸出 - >添加項目輸出組彈出 項目:選擇我的項目,主輸出
- 選擇自定義動作編輯器 - >安裝 - >右鍵 - >添加自定義操作 - >選擇應用程序文件夾和項目輸出。
- 生成安裝程序。
重複相同的用於卸載
.msi和setup.exe文件在該文件夾中創建。
我看到https://www.youtube.com/watch?v=cp2aFNtcZfk教程做到這一點。
可以告訴我如何解決這個問題。
感謝
編輯:我有projectInstaller在我的項目
namespace certify4byd_ver2._0
{
partial class ProjectInstaller
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService;
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;
//
// serviceInstaller1
//
this.serviceInstaller1.Description = "Quick Source specific development to allow ftp files to be send to ByDesign envir" +
"onment";
this.serviceInstaller1.DisplayName = "Quick Source Certify4ByDesign";
this.serviceInstaller1.ServiceName = "qs_certify4byd_v2.0";
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
this.serviceInstaller1.AfterInstall += new System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_AfterInstall);
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1});
}
#endregion
private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
private System.ServiceProcess.ServiceInstaller serviceInstaller1;
}
}
看看https://stackoverflow.com/questions/9021075/how-to-create-an-installer-for-a-net-windows-service-using-visual-studio - 任何你已經也許失蹤? –
@DirkVollmar:不,我沒有錯過任何東西。 – GameBuilder