0
votes

I have a Solution with 4 Projects inside. 2 of them are VSTO Projects (Created on Win7 for Office 2010 / .net4.5) (Excel/Powerpoint) 2 Of them are just normal VB.Net projects.

I have a PC runnging Windows 10 with Office 2013 that can open all the Projects just fine.

Now i've my new Surface book. Running win 10 and Office 2016 I've also installed a version of Office 2010 for other compatability reasons.

On the Surface book I however can only open the normal Peojects. The 2 VSTO projects can't be opened. When trying to load them (or click install missing features) i get this message: Error message

I've checked all the References. (By manually searching the Paths to the .dlls)

On the Surface book the installation order was:

  1. Office 2010

  2. Office 2016

  3. Visual Studio Community 2015

  4. Visual Studio VSTO for 2015

  5. Visual Studio Tools 2010 for Office Runtime

I really can't seem to figure out why i can't open the projects :(

EDIT: It seems that .net 4.5 is the culpit.

On The surface when i create an Excel 2010 addin. It gets created targeting 4.5.2

As soon as i change that to 4.5 It tries an "one way upgrade" and is than no longer captable of opening the project.

3
I have the same issue. I tried to setup an empty Excel 2010 Addin-Project in Visual Studio 2010 and copy it to a second computer with Visual Studio 2015. I compared the .vbproj-file line by line with an empty Excel 2016 Addin-Project from Visual Studio 2015. By copying some lines I reached a state, where I could load the VS 2010 Project into VS 2015. Some imports refer to a direct path and that seems to be the problem. However the error log is very poor and I did not exactly find the spot and could not make it to import a working project. Well programmed VS!?DrMarbuse

3 Answers

1
votes

Fun fact: With Visual Studio 2017 everything loads just fine :thumbsup:

0
votes

You need to install http://aka.ms/officedevtoolsforvs2015 .

Please remember that VSTO allows developing version-specific add-ins. See Running Solutions in Different Versions of Microsoft Office for more information.

0
votes

In the .vbproj-File there are two lines that seem to be critcal:

Visual Studop 2015:

Second Line:

<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')" />

somewhere further down:

<!-- Include additional build rules for an Office application add-in. -->
  <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />