none
Installation Problem with Outlook Addin - VS2008 RRS feed

  • Question

  • Hi  (sorry if this is long, bear with me, I dont want to miss anything that might help)

    I have an outlook add-in. It was created in VS2008, but with Office 2003 installed in the dev PC that runs on XP.  I have been developing and building succesfully for months now and the add-in is being installed in workstations with either Office 2003 or Office 2007. It works fine.

    Last week, we were upgraded to Windows 7. I now have Office2007. I simply reinstalled VS2008 in the same PC. When I open the solution, the VS converter wizard popped up. I thought it was weird, since I was using the same version of VS2008. Is that normal?

    After conversion the solution loaded and i can see that the add-in project is referencing v9.0 Microsoft Office assemblies.  When I run in debug mode, the add-in works just fine (a button is added in the outlook menu, and on click a small window is displayed).  However, when I build the installer and try installing using the .msi, the add-in does not appear in Outlook.

    I've seen in the forums that in VS2008, someone said that the Manifest key in the registry should be pointing to the .vsto file instead of the previous .dll.manifest file. I can't seem to get the installer project to point to this file >> I change the value, but after I build the installer project, it switches back to dll.manifest!

    I've tried a hack: after installation, update the Manifest setting in the registry to point to the .vsto file: <path+filename>.vsto|vstolocal

    The addin loads succesfully, but when i try using it, I encounter weird errors. Ex: I have a line that reads from the app config file >> ConfigurationManager.AppSettings["key1"].toString().Trim()    >> the error is a null pointer exception error. its as if the app can't see the config file! I dont know if the "hack" caused that.

    I'm not sure what I'm doing wrong here :( I dont know if the problem is because I changed from XP to Win7 in my build machine, or if because the version of the MS Office installed changed from 2003 to 2007, or because I have VS2010 on the same machine, or something else.

    Summary Questions:

    1. Why does the solution keep changing the manifest registry value to ...dll.manifest after building, eventhough I already set it to ...vsto|vstolocal?  I even dowloaded a sample project from the Microsoft Site (Excel-addin) and I can see that the manifest value is vsto|vstolocal, but when I build it, it reverts to dll.manifest! Here's the sample solution I downloaded: http://code.msdn.microsoft.com/VSTO-30-Excel-AddIn-Sample-4517c7ef

    2. Why does VS2008 keep converting my solution and pointing to MS Office 9.0 (2007) assemblies? I believe that originally, my solution was a 2003 Office add-in project, but VS 2008 converts it to 2007! How do I stop this? Is the fact the I have VS2010 an issue? Or that I have Office 2007 in that PC instead of Office 2003?  All the conversion seems to do is to update the references to point to v9.0 MS Office assemblies.

    3. When building the installer project, is it correct that I have to add the .vsto file and the .dll.manifest file? When I was using VS2008 in XP (Office2003), I didn't need to do that. Only the project output was added in the installer project.

    4. After installation, is it bad to manually update the Manifest registry setting from dll.manifest to .vsto|vstolocal? Or is there anything else that I should update as well for it to work properly?



    Please help :(



    • Edited by ximoximo Wednesday, November 23, 2011 2:00 AM
    Tuesday, November 22, 2011 11:04 AM

Answers

  • Hi ximoximo,

     

    Thanks for posting in the MSDN Forum.

     

    <<1.Why does the solution keep changing the manifest registry value to …dll.manifest after building, eventhough I already set it to … vsto|vstolocal? >>

    In my opinion, the *.dll.manifest has no relationship with the registry key value of Manifest. The vsto|vstolocal used in the registry key value of Manifest to point out the primary path of the add-in. And I think you might misunderstanding this registry key value. The correct registry key value like this “[your add-in application’s path]\[your add-in application’s name].vsto|vstolocal”. And [your add-in application’s name].vsto is a file which exists in the [your add-in application’s path] for your add-in application. When Office suite launch, Office suite will check it to load the add-in.

    <<Why does VS2008 keep converting my solution and pointing to MS Office 9.0(2007) assemblies? >>

    Do you install Office 2003 on your target machine? I’m not sure about the environment on your side. However I think it will be occurred due to incorrect Office version or VSTO runtime.

    <<When building the installer project, is it correct that I have to add the .vsto file and the .dll.manifest file? >>

    Yes, these file must include in you distribution.

    <<After installation, is it bad to manually update the Manifest registry setting form dll.manifest to .vsto|vstolocal? >>

    Registry value of Manifest is used to point out the path of your add-in application. You can modify it if you move your add-in application to other place. And it has no relationship with dll.manifest file.

     

    I hope what I said can help you.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 29, 2011 8:15 AM
    Moderator

All replies

  • Hello,

    > Last week, we were upgraded to Windows 7. I now have Office2007. I simply reinstalled VS2008 in the same PC. When I open the solution, the VS converter wizard popped up. I thought it was weird, since I was using the same version of VS2008. Is that normal?

    Yes, in a degree. In the main menu of VS, choose Tools | Options | Office Tools | Project Upgrade and see the checkbox "Automatically upgrade to installed Office version". To get to that item, you may need to tick the "Show All settings" checkbox in the left bottom corner of the Tools | Options dialog. The same machinery is implemented in VS 2010.

    I assume that your add-in is a VSTO add-in, not Shared Add-in. Is this correct? If so, your further actions depend on what Office versions do you need to support.

    If you need to support Office 2003, you need to restore the state of your project. Also see Using VS 2008 to continue working on Office 2003 Add-ins.

    If you need to support Office 2007, then I'd suggest creating a new ampty add-in and comparing its settings with your existing project. Note that in a new add-in project targeting Office 2007 there's no setup project. They introduced ClickOnce instead. See Building Office Business Applications Using Visual Studio Tools for the Office System (3.0).

    You may need to support both Office 2003 and 2007; in this case, you'll need to have two projects.

    When you decide to support Office 2010, you'll get one more project. And there's a lot of changes in VS 2010, see Visual Studio 2010. What's New in Office Development.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Wednesday, November 23, 2011 12:54 PM
  • Hi ximoximo,

     

    Thanks for posting in the MSDN Forum.

     

    <<1.Why does the solution keep changing the manifest registry value to …dll.manifest after building, eventhough I already set it to … vsto|vstolocal? >>

    In my opinion, the *.dll.manifest has no relationship with the registry key value of Manifest. The vsto|vstolocal used in the registry key value of Manifest to point out the primary path of the add-in. And I think you might misunderstanding this registry key value. The correct registry key value like this “[your add-in application’s path]\[your add-in application’s name].vsto|vstolocal”. And [your add-in application’s name].vsto is a file which exists in the [your add-in application’s path] for your add-in application. When Office suite launch, Office suite will check it to load the add-in.

    <<Why does VS2008 keep converting my solution and pointing to MS Office 9.0(2007) assemblies? >>

    Do you install Office 2003 on your target machine? I’m not sure about the environment on your side. However I think it will be occurred due to incorrect Office version or VSTO runtime.

    <<When building the installer project, is it correct that I have to add the .vsto file and the .dll.manifest file? >>

    Yes, these file must include in you distribution.

    <<After installation, is it bad to manually update the Manifest registry setting form dll.manifest to .vsto|vstolocal? >>

    Registry value of Manifest is used to point out the path of your add-in application. You can modify it if you move your add-in application to other place. And it has no relationship with dll.manifest file.

     

    I hope what I said can help you.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 29, 2011 8:15 AM
    Moderator