none
Excel VSTO project not loading after upgrading from Office 2013 to Office 2016 RRS feed

  • Question

  • I get the below error on loading the project with VS 2013 (with Office 2016 installed)

    Cannot create the project because the application associated with this project type is not installed on this computer. You must install the Microsoft Office application that is associated with this project type.

    The C# project was originally created as Excel Workbook using VS 2013 with Office 2013 and runtime as 'Visual Studio 2010 Tools for Office Runtime'. .Net Framework has also not changed.

    When I looked inside the .csproj file, I found the below references to Office Dll's, Office versions and the ProjectProperties section was pointing to C:\Program Files\Microsoft Office\Office15\Excel.exe which does not exist after the upgrading to Office 2016.

    What are all the things that i need to manually repair within the .csproj file to get the project loading?

     <ItemGroup>
        <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
          <Private>False</Private>
        </Reference>
        <Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
      </ItemGroup>
      
      <ProjectProperties HostName="Workbook.xlsx" HostPackage="{3F2B7691-D1D1-402F-9370-2704A737CF60}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="XLS" Language="CS" TemplatesPath="VSTOTemplates" DebugInfoExeName="C:\Program Files\Microsoft Office\Office15\Excel.exe" DebugInfoCommandLine="/x &quot;[$OUTPUT]Workbook.xlsx&quot;" />

    Tuesday, August 30, 2016 10:08 PM

All replies

  • >>>Cannot create the project because the application associated with this project type is not installed on this computer. You must install the Microsoft Office application that is associated with this project type.

    According to your description, you could replace HostPackage="{3F2B7691-D1D1-402F-9370-2704A737CF60}" with HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}". 

    For more information, click here to refer about Troubleshooting Errors in Office Solutions

    • Proposed as answer by David_JunFeng Thursday, September 8, 2016 1:26 AM
    • Marked as answer by David_JunFeng Thursday, September 8, 2016 1:26 AM
    • Unmarked as answer by sagopal Wednesday, September 28, 2016 3:20 AM
    Wednesday, August 31, 2016 2:52 AM
  • Thanks for looking into my problem.

    I see using this GUID 29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1 as a solution in a few online resources (specific to broken vsto project after Office 2010 to Office 2013 upgrade). Can you advise how this particular GUID will fix the problem ?

    In the Troubleshooting link you have provided, the starting part of the section "Cannot Open a Project after Migration" clearly mentions that the solutions are related to different version(s) of Microsoft Office and has no mention of Office 2016.

    Anyways, I made the change as per your suggestion and the previous error is gone, and I am getting a few new error(s) shown below.

    "error  : Visual Studio has encountered an unexpected error."

     error  : A project with that name is already opened in the solution.

    Wednesday, August 31, 2016 3:50 AM
  • Is it true that VSTO project created on a machine with Office 2013 will only work (for development) on a machine with Office 2013 ?

    Wednesday, August 31, 2016 10:56 PM
  • >>>Is it true that VSTO project created on a machine with Office 2013 will only work (for development) on a machine with Office 2013 ?

    No, you could refer to Running Solutions in Different Versions of Microsoft Office

    Thursday, September 1, 2016 9:40 AM
  • The link you have provided only talks about runtime requirements.

    I understand that a VSTO project created with Office 2013 will deploy and run on a machine with Office 2016.

    But my actual question is related to opening the VSTO project(originally created on a computer with Office 2013) in Visual Studio (on a computer with Office 2016)


    • Edited by sagopal Wednesday, September 28, 2016 9:51 PM
    Wednesday, September 28, 2016 9:37 PM