Search code examples
c#winformswindows-installersetup-deployment

C# App Install Error - microsoft.visualstudio.hostingprocess.utilites.sync version 9.0.0.0 missing from Global Assembly Cache (GAC)


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.

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:

   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
  • .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
  • Excluded Files: CCP_Utility.vshost.exe, CCP_Utility.pdb
  • Prerequisite Files: Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll, stdole.dll

I've tried:

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! :)


Solution

  • 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. Project Types

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

    4. Right click the myEXE > go View File System

    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" File System on Target Machine

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

    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)

    I hope this helps others as well :)