none
You Cannot DEBUG - Required Version of Office Not Installed RRS feed

  • Question

  • Hi friends,

    My Office 2010 + VS 2010 were going on good enough. Unfortunately the day I had MS-Office 2013 installed the moment I start to debug any project with an F5 upcomes the message:

    You cannot debug or run this project, because the required version of the Microsoft Office application is not installed.

    How can I simply create an Excel 2010 Add In from the VSTO templates available for the same in the VS 2010, although I have Office 2013 installed?

    Please see if you can help.

    Thanx in advance.


    Best Regards, Faraz A Qureshi

    Wednesday, April 17, 2013 1:15 PM

Answers

All replies

  • you can create Excel 2010 Add-in project from the VSTO templates as the same situation which you have not installed Office 2013.  I think you replace the Office 2010 when you Install Office 2013, So when you install Office 2013, you should choose keep Office 2010 version. 

    You also can share your Excel 2010 Add-in to SkyDrive, Because I instal Office 2010 and Office 2013 on my machine, I can test on my local machine and check whether this issue can reproduce.

    Thanks.


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample

    Wednesday, April 17, 2013 2:14 PM
  • multi office installation on developer box is a bad idea, as is developing vsto for such systems. Only latest installation will support vsto.

    either revert machine back to just 2010 installation or change project type of your vsto to simple dll and in debug section of your project set up to start external app and point to excel.

    Thursday, April 18, 2013 4:18 AM
  • Thanx Damian,

    I really oblige your more professional reply.

    However, reverting back to Office2010 is out of question since the system is provided by the employer. Shall oblige if you would further kindly guide me with an example of step by step simple add-in in, like to add a simple ribbon tab with a button giving a msgbox of "TEST", developed in form of a .dll

    Thanx again buddy!


    Best Regards, Faraz A Qureshi

    Thursday, April 18, 2013 6:08 AM
  • 1. create normal add-in project

    2. build it so registry entries are added, etc. Ensure that your add-in actually Works (show messagebox on startup), Do not debug.

    3. in ad-in csproj file remove entry for ProjectTypeGuids and reload solution in vs

    4. edit project and set in debug section to start external app - Excel in your case

    5. build app, start debugging, it should start Excel and attach to it

    Thursday, April 18, 2013 6:34 AM
  • Hi Raraz,

    You can refer to the MSDN article to get help.

    Getting Started Programming Application-Level Add-Ins

    And you also can refer to the below blogs to know more.

    Creating an Add-in for Office 2007 and Office 2010 that "Lights Up" on Office 2010 (McLean Schofield)Developing an add-in for multiple versions of Offic


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample

    Thursday, April 18, 2013 6:40 AM
  • Thanx LH!

    Sure did find the second reference to be an excellent source of info! Sure do oblige the same a lot buddy!

    By the way this friend of yours is Faraz not Raraz ;)


    Best Regards, Faraz A Qureshi

    Thursday, April 18, 2013 11:02 AM
  • This is still an issue in Visual Studio 2013. I got past the "You cannot debug or run this project" version message by following these steps: 

    1. Expand the project References node and select the interop DLL (i.e. -- Microsoft.Office.Interop.Excel)
    2. Look for the version being targeted under the PIA folder.  Mine was "...\PIA\Office15".
    3. Find the real version of Office you have installed by checking registry keys.  In my case, "HKLM\Software\Microsoft\Office" had several version folders with "Common" keys, but only the "14.0" showed Excel.
    4. If they don't match, delete the interop DLL Reference and browse to the correct one, which may mean downloading and installing the correct one first.
    5. Save All then find the .csproj file on your hard drive.
    6. Open your add-in .csproj file in a text editor and search for the incorrect version number.  ("15" for this example.)
    7. Selectively replace it with the correct version where the XML is referring to your target Office version.
    8. Save the .csproj file and return to Visual Studio.
    9. Reload the solution, and you should be able to run or debug the project.

    I hope this helps.  Raraz's "multiple version" may also work, but the steps above allow you to target and test a particular version of Office.



    • Edited by CZahrobsky Wednesday, October 30, 2013 4:14 PM Spell Check
    Tuesday, October 29, 2013 8:35 PM
  • >> remove entry for ProjectTypeGuids

    Thanks, DamianD(MCC).  Your steps worked for me. 

    It seems the ProjectTypeGuids was also causing problems running the same csproj on two different Win7 64 workstations with the same versions/patches of VS2010 and VS2013.  One workstation has Office 2010, the other, Office 2013. The workstation with Office 2013 insisted on a one-way conversion of the VS2010-based project; the same project that underwent a compatible conversion to VS2013 on the workstation running Office 2010. The compatible conversion allows the same project to run within VS2010 and VS2013 in my case.

    Anyway, to support both Office 2010 and 2013, I suggest first setting up the Office AddIn using VS2010 if available.


    • Edited by bvj Friday, May 2, 2014 12:22 AM
    Friday, May 2, 2014 12:17 AM