I have inherited a MS Excel addin project written in VS 2010 and because I have never written a VS addin before, I am somewhat confused as to why I cannot start it from the Visual Studio.
The project compiles without error, but when I attempt to start it, it says 'You cannot debug or run this project, because the required version of the Microsoft Office application is not installed'. I have MS Excel 365 installed and when I download the compiled addin installation pcakage, I can install and run the addin within my Excel alright.
From another question here, I understood that the reason could be that the .csproj file contains a different path to Excel (from the original's author machine) than what it needs to be on my machine.
In my .csproj file, under ProjectExtensions > VisualStudio elements, there's:
<FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
<ProjectProperties HostName="Excel" HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0" VstxVersion="4.0" ApplicationType="Excel" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
<Host Name="Excel" GeneratedCodeNamespace="ConfigDBaddin" PublishedHash="69C324AB27932AA2FBF2B7EA72250886FF164DE6" IconIndex="0">
<HostItem Name="ThisAddIn" Code="ConfigDBAddin.cs" CanonicalName="AddIn" PublishedHash="879FD8B71587DEEC71FFEFE50C6C4996636229AA" CanActivate="false" IconIndex="1" Blueprint="ConfigDBAddin.Designer.xml" GeneratedCode="ConfigDBAddin.Designer.cs" />
</Host>
</FlavorProperties>
The registry path Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe
doesn't even exist at all on my computer. I have a 14.0
and 15.0
sections in the Office
section, but none of them contains an Excel
section. I assume that I need to change this in the .csproj file to something, but am not sure to what.
What do I have to do to successfully launch the addin from VS?