应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

时间:2021-01-09 02:46:49

Background: I have a winforms app written in C# that converts xlsx files to csv by calling a 2nd entirely seperate application ConvertExcelTo.Exe from the command line. I'm using the Build Publishing tool to compile a setup / install file out of the solution for the winforms app.

背景:我有一个用c#编写的winforms应用程序,通过调用第二个完全分离的应用程序ConvertExcelTo,将xlsx文件转换为csv。来自命令行的Exe。我正在使用构建发布工具从winforms应用程序的解决方案中编译安装/安装文件。

Problem: The Windows installer completes without any errors on my computer with Windows 7 Ultimate, Visual Studio 2010 Premium, and Framework 3.5 but the user operating on Windows XP SP3 without VS gets the following installation error message:

问题:Windows安装程序在我的电脑上安装了Windows 7 Ultimate、Visual Studio 2010 Premium和Framework 3.5,没有任何错误。

   This application requires microsoft.visualstudio.hostingprocess.utilites.sync 
   version 9.0.0.0 be installed in the Global Assembly Cache (GAC) first.

Under Prerequisites I have selected:

在先决条件下,我已选择:

  • Windows Installer 3.1
  • Windows安装程序3.1
  • .Net Framework 3.5
  • net Framework 3.5
  • Download prerequisites from the component vendor's website
  • 从组件供应商的网站下载先决条件

Under Application Files I have:

在申请文件下,我有:

  • Included Files: CCP_Utility.exe, CCP_Utility.exe.config, CCP_Utility.exe.manifest, ConvertExcelTo.exe, ExcelConversion.dll, Icon1.ico, Microsoft.Office.Interop.Excel.dll, Microsoft.Vbe.Interop.dll, office.dll
  • 包含文件:CCP_Utility。exe,CCP_Utility.exe。配置,CCP_Utility.exe。清单,ConvertExcelTo。exe,ExcelConversion。dll,Icon1。ico,Microsoft.Office.Interop.Excel。dll,Microsoft.Vbe.Interop。dll,office.dll
  • Excluded Files: CCP_Utility.vshost.exe, CCP_Utility.pdb
  • 排除文件:CCP_Utility.vshost。exe,CCP_Utility.pdb
  • Prerequisite Files: Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll, stdole.dll
  • 先决条件文件:Microsoft.VisualStudio.HostingProcess.Utilities.Sync。dll,stdole.dll

I've tried:

我试过了:

  • Adding the existing items ConvertExcelTo.exe and ExcelConversion.dll to the Project Solution and deleting the References to these files externally
  • 添加现有项目ConvertExcelTo。exe和ExcelConversion。到项目解决方案的dll,并从外部删除对这些文件的引用
  • Excluding ConvertExcelTo.vshost.exe from the Application's Files under the Build Pubisher and deleting the file from the Solution
  • 不包括ConvertExcelTo.vshost。从构建Pubisher下的应用程序文件中提取exe并从解决方案中删除文件
  • Installing the Windows 4.5 SDK for XP SP3 & Vista here: http://download.microsoft.com/download/7/c/4/7c426dfc-46e2-4ded-bab4-3b33600ad7d1/msi45sdk.msi
  • 在这里安装XP SP3和Vista的Windows 4.5 SDK: http://download.microsoft.com/download/7/c/4/7c426dfc-46e2- 4贸易区bab4-3b33600ad7d1/msi45sdk.msi

Question:

问题:

  • What does the user have to download to get the installer to complete without errors?
  • 用户需要下载什么才能使安装程序完成而不出现错误?
  • What do I need to edit in the Publisher so that other users don't get this error?
  • 我需要在发布者中编辑什么,以便其他用户不会得到这个错误?
  • Should I set any of the prerequisite files to be included files?
  • 我是否应该设置要包含的任何前提文件?

Thanks for looking! :)

谢谢你看!:)

1 个解决方案

#1


2  

I solved this issue by adding a Setup and Deployment project to my existing project to create an installer where I could select "Global Assembly Cache Folder" by right clicking "File System on Target Machine"

我通过在现有项目中添加一个安装和部署项目来解决这个问题,我创建了一个安装程序,通过右键单击“目标机器上的文件系统”,我可以选择“全局程序集缓存文件夹”

  1. In the existing project, Go to File Menu > click Add > New Project > now the “Add New Project” dialog will appear.

    在现有的项目中,转到文件菜单>,点击添加>新项目>,这时将出现“添加新项目”对话框。

  2. Select the “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK. 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    选择“其他项目类型”,点击“设置和部署”项目,选择“设置项目”,在name文本框中给出项目名称,最后点击OK。

  3. New project appear in solution explorer,for eg., you have give the name “myEXE” file will be displays with given name.

    新项目出现在解决方案资源管理器中,例如。,您已经给出了名称“myEXE”文件将以给定的名称显示。

  4. Right click the myEXE > go View 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    右击> go视图

  5. You can see the “File System on Target Machine” under 3 folders: Application Folder, User’s Desktop, & User’s Program Menu. Right click the "File System on Target Machine" and select "Global Assembly Cache Folder" 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    您可以在3个文件夹下看到“目标机器上的文件系统”:应用程序文件夹、用户桌面和用户程序菜单。右击“目标机器上的文件系统”,选择“全局程序集缓存文件夹”

  6. Select Application Folder and right click Add>Project Output>select Primary output

    选择Application文件夹,右键单击Add>项目输出>选择主输出

  7. Select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to myEXE 8.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)
  8. 选择用户桌面richt单击第二个窗口>,单击新建快捷方式>,从应用文件夹>中选择输出文件,将文件名从主输出名改为myEXE 8。最后,在成功构建项目之后,构建新项目。在应用程序调试或发布文件夹中(取决于属性设置)将出现项目exmye (Setup)

I hope this helps others as well :)

我希望这对其他人也有帮助。

#1


2  

I solved this issue by adding a Setup and Deployment project to my existing project to create an installer where I could select "Global Assembly Cache Folder" by right clicking "File System on Target Machine"

我通过在现有项目中添加一个安装和部署项目来解决这个问题,我创建了一个安装程序,通过右键单击“目标机器上的文件系统”,我可以选择“全局程序集缓存文件夹”

  1. In the existing project, Go to File Menu > click Add > New Project > now the “Add New Project” dialog will appear.

    在现有的项目中,转到文件菜单>,点击添加>新项目>,这时将出现“添加新项目”对话框。

  2. Select the “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK. 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    选择“其他项目类型”,点击“设置和部署”项目,选择“设置项目”,在name文本框中给出项目名称,最后点击OK。

  3. New project appear in solution explorer,for eg., you have give the name “myEXE” file will be displays with given name.

    新项目出现在解决方案资源管理器中,例如。,您已经给出了名称“myEXE”文件将以给定的名称显示。

  4. Right click the myEXE > go View 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    右击> go视图

  5. You can see the “File System on Target Machine” under 3 folders: Application Folder, User’s Desktop, & User’s Program Menu. Right click the "File System on Target Machine" and select "Global Assembly Cache Folder" 应用程序安装错误- microsoft.visualstudio.hostingprocess. utility。从全局程序集缓存(GAC)中丢失的同步版本9.0.0

    您可以在3个文件夹下看到“目标机器上的文件系统”:应用程序文件夹、用户桌面和用户程序菜单。右击“目标机器上的文件系统”,选择“全局程序集缓存文件夹”

  6. Select Application Folder and right click Add>Project Output>select Primary output

    选择Application文件夹,右键单击Add>项目输出>选择主输出

  7. Select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to myEXE 8.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)
  8. 选择用户桌面richt单击第二个窗口>,单击新建快捷方式>,从应用文件夹>中选择输出文件,将文件名从主输出名改为myEXE 8。最后,在成功构建项目之后,构建新项目。在应用程序调试或发布文件夹中(取决于属性设置)将出现项目exmye (Setup)

I hope this helps others as well :)

我希望这对其他人也有帮助。