none
Can't create/open .net 4.5 VSTO in WIndows 10 VS2015 RRS feed

  • Question

  • Hello and good morning,

    I recently got my new Surface book. So i wanted to get VS2015 working like on my old laptop. 

    On the Surface however i can't open (or create) VSTO 2010 Addins targeting .net 4.5

    I can create a new project (excel 2010 addin for example). By default this will target .net 4.5.2 

    When i try to change that to .net 4.5 a "onetime upgrade" window pops up. An after that the project can't be loaded anymore.

    I've installed VS and Office in that order: 

    1. Office 2010

    2. Office 2016

    3. Visual Studio 2015

    4. VSTO Tools for 2015

    4. VSTO Runtime 2010 


    • Edited by Joshua Kre Sunday, September 18, 2016 1:06 PM
    Sunday, September 18, 2016 7:47 AM

Answers

  • Hi,

    What is your specific version of Office2016 and Office2010?

    Are you using Office 2010 Click-to-Run products?

     

    The following is my comparison between before and after upgrading.

    https://www.diffchecker.com/DTcO4I8c

     

    Try to manually modify HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0"  into HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0"

     

    And if you want to debug with Office2010, change into DebugInfoExeName="#Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe"

    if you want to debug with Office2016, change into DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe"

     

    For my test result, if you want the Office2016  as default application (after repairing Office2016),

    Though I manually modify  the properties into HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0",  after reloading, it would prompting Upgrading. Meaning, HostPackage should be the default version(the version of last install/repair) 

    If it still doesn’t work, Could you please share a sample project with us? So that we could reproduce and find the cause.


    Monday, September 26, 2016 12:08 PM
    Moderator

All replies

  • Hello Joshua,

    There is no need to install VSTO 2010 Runtime for VS 2015.

    VSTO allows creating version-specific Office add-ins. To be able to debug the add-in you need to install an appropriate version of Visual Studio. VS 2015 supports Office 2013 and 2016 only. Anyway, try to install http://aka.ms/officedevtoolsforvs2015 .

    Also you may find the Running Solutions in Different Versions of Microsoft Office article helpful.


    [custom.development]

    Sunday, September 18, 2016 2:06 PM
  • The runtime in your link is already installed. 

    Strange thing is that this also happens when i create a new VSTO Excel 2010 Addin and then try to change the Target .Net version. 

    It gets "Upgraded" and then can't be opened.

    Sunday, September 18, 2016 5:27 PM
  • Do you create an add-in for Excel 2010 in VS 2015?

    [custom.development]

    Sunday, September 18, 2016 5:47 PM
  • Hi,

    If you do not change the .net target, could the project succeed in debugging and running?

    If you could successfully create a project with Office2016 or not?

    If changing the .net framework for the project with Office2016, would the issue occur the same as Office2010?

     

    In fact, VS does not support multiple versions of Office, please visit

    Why is VS development not supported with multiple versions of Office?

    The article makes a detailed explanation and shares the workaround if you want to have multiple versions of Office.

     

    Monday, September 19, 2016 5:46 AM
    Moderator
  • The project was originally created on VS2015 Win7
    Monday, September 19, 2016 5:55 AM
  • When creating an Office 2013/16 Addin i can in fact change the Target. It only gets corrupt with an 2010 Addin. 

    When i create an excel 2010 addin with .net 4.5 i can run  it and it loads just fine. But when i change the target (Or create it with another .net and change the target afterwards) then it gets corrupt and cant ve opened anymore.

    I do not want to support multiple versions of office i just want do develop the addin for 2010. But i cant open it because of some resaon... 
    • Edited by Joshua Kre Monday, September 19, 2016 6:24 AM
    Monday, September 19, 2016 6:06 AM
  • >>I do not want to support multiple versions of office i just want do develop the addin for 2010.

     

    You could change the .net version when creating,

    Tuesday, September 20, 2016 8:42 AM
    Moderator
  • >>I do not want to support multiple versions of office i just want do develop the addin for 2010.

     

    You could change the .net version when creating,


    Yea the problem is that i want to open my existing project. 

    I can create them in .net 4.5 but then they get corrupt when changing the target or they get corrupt when i create them in another .net version ant try to change it to 4.5 

    With 2016 Addins it seems to work just fine.

    Tuesday, September 20, 2016 10:50 AM
  • >>the problem is that i want to open my existing project. 

    How is the existing project developed?

    If you change the .net and now you want to open it with Office2010?

    Since you install both Offcie2010 and Office2016, after graded, you couldn’t open it with Office2010 even you change the project properties.

     

    >>I can create them in .net 4.5 but then they get corrupt when changing the target or they get corrupt when i create them in another .net version ant try to change it to 4.5

     

    After "One-way upgrade" window pops up, do you OK or Cancel?

    I could succeed in debugging or running the upgraded project, but it is with Office2016. And

    I think it is because the Office client apps are COM-based. Normal COM activation relies on the registry. COM registration is a “last one wins” model. That is, you can have multiple versions of a COM server, object, interface or type library on a machine at the same time. Also, all of these entities can be registered. However, multiple versions can (and usually do) use the same identifiers, so whichever version was registered last overwrites any previous one.

    For more information, please visit Why is VS development not supported with multiple versions of Office?

    Since you are installing both Office2010 and Office2016, once changing the original settings of the project with Office2010, VS would automatically upgrade it and then use Office2016.

    Wednesday, September 21, 2016 6:19 AM
    Moderator
  • >>the problem is that i want to open my existing project. 

    How is the existing project developed?

    If you change the .net and now you want to open it with Office2010?

    Since you install both Offcie2010 and Office2016, after graded, you couldn’t open it with Office2010 even you change the project properties.

     

    >>I can create them in .net 4.5 but then they get corrupt when changing the target or they get corrupt when i create them in another .net version ant try to change it to 4.5

     

    After "One-way upgrade" window pops up, do you OK or Cancel?

    I could succeed in debugging or running the upgraded project, but it is with Office2016. And

    I think it is because the Office client apps are COM-based. Normal COM activation relies on the registry. COM registration is a “last one wins” model. That is, you can have multiple versions of a COM server, object, interface or type library on a machine at the same time. Also, all of these entities can be registered. However, multiple versions can (and usually do) use the same identifiers, so whichever version was registered last overwrites any previous one.

    For more information, please visit 

    Since you are installing both Office2010 and Office2016, once changing the original settings of the project with Office2010, VS would automatically upgrade it and then use Office2016.

    The project was originally created on Win7 with office 2010 and VS 2015 

    When i Create an office 2010 project now i can debug it in Office 2010 

    I "OK" the oneway upgrade 

    but the upgrade didn't pop up on the existig project. THere i Can only click "Reload project " and "install missing features" both of them yield the same result. 

    The strange thing is that i can't even open the project. 

    But when Create an office 2010 addin it gets debugged with office 2010 and when i create a office 2016 addin it gets debugged with 2016


    • Edited by Joshua Kre Wednesday, September 21, 2016 9:46 AM
    Wednesday, September 21, 2016 9:44 AM
  • It seems that the issue is actually upgrading failed.

    Only the specific project or all the projects need upgraded (which you change the version of .net) couldn’t be reloaded?

    Wednesday, September 21, 2016 11:05 AM
    Moderator
  • It seems that the issue is actually upgrading failed.

    Only the specific project or all the projects need upgraded (which you change the version of .net) couldn’t be reloaded?

    there is one excel and one powerpoint project. both failing. 

    the upgrade does fail on every new created though. 

    but why is it upgrading. it's not happening on 2016 addins. only when i create 2010 addins. 

    Wednesday, September 21, 2016 12:16 PM
  • Hi Joshua Kre,

    If you just open your VS2015 in your Surface book, and then create a new default VSTO 2010 Addins project, for example, you use the .net 4.6.2, and then change it to be .NET 4.5, how about the result?

    I will get the result like the following screen shot, but if I click "OK" button, it works well in my side.

    This is my .xxproj file, you could compare it with yours.

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
      <!--
        This section defines project-level properties.
    
        AssemblyName
          Name of the output assembly.
        Configuration
          Specifies a default value for debug.
        OutputType
          Must be "Library" for VSTO.
        Platform
          Specifies what CPU the output of this project can run on.
        NoStandardLibraries
          Set to "false" for VSTO.
        RootNamespace
          In C#, this specifies the namespace given to new files. In VB, all objects are
          wrapped in this namespace at runtime.
      -->
      <PropertyGroup>
        <ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
        <ProjectGuid>{B0783ABD-BC59-4211-A383-55B671E63DF0}</ProjectGuid>
        <OutputType>Library</OutputType>
        <NoStandardLibraries>false</NoStandardLibraries>
        <RootNamespace>ExcelAddIn1</RootNamespace>
        <AssemblyName>ExcelAddIn1</AssemblyName>
        <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
        <DefineConstants>VSTO40</DefineConstants>
        <TargetFrameworkProfile />
        <FileUpgradeFlags>
        </FileUpgradeFlags>
        <UpgradeBackupLocation>
        </UpgradeBackupLocation>
        <OldToolsVersion>14.0</OldToolsVersion>
        <VSTO_TrustAssembliesLocation>true</VSTO_TrustAssembliesLocation>
        <BootstrapperEnabled>true</BootstrapperEnabled>
        <PublishUrl>publish\</PublishUrl>
        <InstallUrl />
        <TargetCulture>en</TargetCulture>
        <ApplicationVersion>1.0.0.0</ApplicationVersion>
        <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
        <UpdateEnabled>true</UpdateEnabled>
        <UpdateInterval>7</UpdateInterval>
        <UpdateIntervalUnits>days</UpdateIntervalUnits>
        <IsWebBootstrapper>False</IsWebBootstrapper>
        <ProductName>ExcelAddIn1</ProductName>
        <PublisherName />
        <SupportUrl />
        <FriendlyName>ExcelAddIn1</FriendlyName>
        <OfficeApplicationDescription />
        <LoadBehavior>3</LoadBehavior>
      </PropertyGroup>
      <ItemGroup>
        <BootstrapperPackage Include=".NETFramework,Version=v4.5">
          <Visible>False</Visible>
          <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
          <Visible>False</Visible>
          <ProductName>.NET Framework 3.5 SP1</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.Office.PIARedist.2007">
          <Visible>False</Visible>
          <ProductName>Microsoft Office 2007 Primary Interop Assemblies</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
          <Visible>False</Visible>
          <ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
          <Visible>False</Visible>
          <ProductName>Windows Installer 3.1</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
          <Visible>False</Visible>
          <ProductName>Windows Installer 4.5</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
      </ItemGroup>
      <PropertyGroup>
        <!--
          OfficeApplication
            Add-in host application
        -->
        <OfficeApplication>Excel</OfficeApplication>
      </PropertyGroup>
      <!--
        This section defines properties that are set when the "Debug" configuration is selected.
    
        DebugSymbols
          If "true", create symbols (.pdb). If "false", do not create symbols.
        DefineConstants
          Constants defined for the preprocessor.
        EnableUnmanagedDebugging
          If "true", starting the debugger will attach both managed and unmanaged debuggers.
        Optimize
          If "true", optimize the build output. If "false", do not optimize.
        OutputPath
          Output path of project relative to the project file.
        WarningLevel
          Warning level for the compiler.
      -->
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>bin\Debug\</OutputPath>
        <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
        <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <!--
        This section defines properties that are set when the "Release" configuration is selected.
    
        DebugSymbols
          If "true", create symbols (.pdb). If "false", do not create symbols.
        DefineConstants
          Constants defined for the preprocessor.
        EnableUnmanagedDebugging
          If "true", starting the debugger will attach both managed and unmanaged debuggers.
        Optimize
          If "true", optimize the build output. If "false", do not optimize.
        OutputPath
          Output path of project relative to the project file.
        WarningLevel
          Warning level for the compiler.
      -->
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\Release\</OutputPath>
        <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
        <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <!--
        This section specifies references for the project.
      -->
      <ItemGroup>
        <Reference Include="Accessibility" />
        <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
        <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
        <Reference Include="System" />
        <Reference Include="System.Data" />
        <Reference Include="System.Drawing" />
        <Reference Include="System.Windows.Forms" />
        <Reference Include="System.Xml" />
        <Reference Include="System.Core" />
        <Reference Include="System.Xml.Linq" />
        <Reference Include="System.Data.DataSetExtensions" />
        <Reference Include="Microsoft.CSharp" />
      </ItemGroup>
      <ItemGroup>
        <Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Microsoft.Office.Tools.Excel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
      </ItemGroup>
      <ItemGroup>
        <Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Private>True</Private>
        </Reference>
      </ItemGroup>
      <!--
        This section defines the user source files that are part of the project.
         
        A "Compile" element specifies a source file to compile.
        An "EmbeddedResource" element specifies an .resx file for embedded resources.
        A "None" element specifies a file that is not to be passed to the compiler (for instance, 
        a text file or XML file).
        The "AppDesigner" element specifies the directory where the application properties files
        can be found.
      -->
      <ItemGroup>
        <Compile Include="Properties\AssemblyInfo.cs">
          <SubType>Code</SubType>
        </Compile>
        <EmbeddedResource Include="Properties\Resources.resx">
          <Generator>ResXFileCodeGenerator</Generator>
          <LastGenOutput>Resources.Designer.cs</LastGenOutput>
          <SubType>Designer</SubType>
        </EmbeddedResource>
        <Compile Include="Properties\Resources.Designer.cs">
          <AutoGen>True</AutoGen>
          <DependentUpon>Resources.resx</DependentUpon>
          <DesignTime>True</DesignTime>
        </Compile>
        <None Include="Properties\Settings.settings">
          <Generator>SettingsSingleFileGenerator</Generator>
          <LastGenOutput>Settings.Designer.cs</LastGenOutput>
        </None>
        <Compile Include="Properties\Settings.Designer.cs">
          <AutoGen>True</AutoGen>
          <DependentUpon>Settings.settings</DependentUpon>
          <DesignTimeSharedInput>True</DesignTimeSharedInput>
        </Compile>
        <Compile Include="ThisAddIn.cs">
          <SubType>Code</SubType>
        </Compile>
        <None Include="ThisAddIn.Designer.xml">
          <DependentUpon>ThisAddIn.cs</DependentUpon>
        </None>
        <Compile Include="ThisAddIn.Designer.cs">
          <DependentUpon>ThisAddIn.Designer.xml</DependentUpon>
        </Compile>
        <AppDesigner Include="Properties\" />
      </ItemGroup>
      <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
      </PropertyGroup>
      <!-- Include the build rules for a C# project. -->
      <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
      <!-- Include additional build rules for an Office application add-in. -->
      <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
      <!-- This section defines VSTO properties that describe the host-changeable project properties. -->
      <ProjectExtensions>
        <VisualStudio>
          <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
            <ProjectProperties HostName="Excel" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Excel" Language="cs" TemplatesPath="VSTOTemplates" DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe" DebugInfoCommandLine="/x " AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
            <Host Name="Excel" GeneratedCodeNamespace="ExcelAddIn1" IconIndex="0">
              <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
            </Host>
          </FlavorProperties>
        </VisualStudio>
      </ProjectExtensions>
    </Project>

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, September 21, 2016 12:53 PM
  • Hi Joshua Kre,

    If you just open your VS2015 in your Surface book, and then create a new default VSTO 2010 Addins project, for example, you use the .net 4.6.2, and then change it to be .NET 4.5, how about the result?

    I will get the result like the following screen shot, but if I click "OK" button, it works well in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click  to participate the survey.

    Okay I've created an excel 2010 addin with 4.6.2 Worked just great. Then I changed to 4.5 and after the oneclick upgrade it's corrupted again. 

    When i look at this diff between your .proj and mine i can see that the reference to 4.5 is not set. And that the reference to office is missing. https://www.diffchecker.com/lSVrk7yo <--- sorry i am not allowed to post links. 

    Wednesday, September 21, 2016 4:22 PM
  • Hi Joshua Kre,

    Please make sure that it is not the .NET4.5 setup issue firstly:

    https://blogs.msdn.microsoft.com/astebner/2008/10/13/net-framework-setup-verification-tool-users-guide/

    Of course, you could re-install .net singly.

    Please also run the following command line:

    (1)Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE);

    2) Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
    3) Open Visual Studio Command Prompt VS2015 x64 Cross Tools Command Prompt, run as administrator.
    4) Run the devenv /InstallVSTemplates switch;
    5) Run the devenv /Setup switch

    And then re-run your VS, re-create a new project, check it again.

    If still no help, maybe repair your VS would be a workaround.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 22, 2016 10:53 AM
  • Hi Joshua Kre,

    Please make sure that it is not the .NET4.5 setup issue firstly:

    Of course, you could re-install .net singly.

    Please also run the following command line:

    (1)Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE);

    2) Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
    3) Open Visual Studio Command Prompt VS2015 x64 Cross Tools Command Prompt, run as administrator.
    4) Run the devenv /InstallVSTemplates switch;
    5) Run the devenv /Setup switch

    And then re-run your VS, re-create a new project, check it again.

    If still no help, maybe repair your VS would be a workaround.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click  to participate the survey.

    Okay i've verifyed 4.5 and it seems to be okay. 

    I've followed the steps (deleting folders running two commands) still doesn't work. 

    I even repaired vs and it didn't change anything.

    BUT!!!  When i Repair office 2010 i can open my old projects and debug them and so on. 

    BUt that changes the default open programms back to 2010. 

    When i then repair 2016 again i get the problems back again.

    Thursday, September 22, 2016 12:41 PM
  • Hi Joshua Kre,

    Do you get any updates under TOOLS->Extensions and updates which were related to the office?

    As you said that it works well after you repair the office 2010, maybe it is related to the office setup.

    Not repair your VS2016, just re-repair that 2010 version, check it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, September 24, 2016 11:02 AM
  • Hi Joshua Kre,

    Do you get any updates under TOOLS->Extensions and updates which were related to the office?

    As you said that it works well after you repair the office 2010, maybe it is related to the office setup.

    Not repair your VS2016, just re-repair that 2010 version, check it again.


    When i only repair the 2010 then VS is working but all the File assiciations are pointing to 2010 as well. 
    And since i want to use 2016 most of the time this is not very nice.

    Extensions and updates shows no updates at all. 

    Sunday, September 25, 2016 6:47 PM
  • Hi,

    What is your specific version of Office2016 and Office2010?

    Are you using Office 2010 Click-to-Run products?

     

    The following is my comparison between before and after upgrading.

    https://www.diffchecker.com/DTcO4I8c

     

    Try to manually modify HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0"  into HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0"

     

    And if you want to debug with Office2010, change into DebugInfoExeName="#Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe"

    if you want to debug with Office2016, change into DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe"

     

    For my test result, if you want the Office2016  as default application (after repairing Office2016),

    Though I manually modify  the properties into HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0",  after reloading, it would prompting Upgrading. Meaning, HostPackage should be the default version(the version of last install/repair) 

    If it still doesn’t work, Could you please share a sample project with us? So that we could reproduce and find the cause.


    Monday, September 26, 2016 12:08 PM
    Moderator
  • Hi,

    What is your specific version of Office2016 and Office2010?

    Are you using Office 2010 Click-to-Run products?

     

    The following is my comparison between before and after upgrading.


     

    Try to manually modify HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0"  into HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0"

     

    And if you want to debug with Office2010, change into DebugInfoExeName="#Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe"

    if you want to debug with Office2016, change into DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe"

     

    For my test result, if you want the Office2016  as default application (after repairing Office2016),

    Though I manually modify  the properties into HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0",  after reloading, it would prompting Upgrading. Meaning, HostPackage should be the default version(the version of last install/repair) 

    If it still doesn’t work, Could you please share a sample project with us? So that we could reproduce and find the cause.


    Wooow great changing the HostPackage version did it. 

    But why ? Isn't 15.0 office 2013 ? 

    Tuesday, September 27, 2016 7:20 AM
  • Yes, 15.0 is Office2013

    In my opinion, the dll of Office2016(16.0) is still 15.0 version, and there is no 16.0 version dll for project hosting.

    Tuesday, September 27, 2016 7:33 AM
    Moderator