User.config file problem after upgrading to Outlook 2010 from 2007. RRS feed

  • Question

  • Hi:

    After I upgraded to Outlook 2010 Professional from Outlook 2007, the Addin searches for the application settings file in a different folder.

    previous: C:\Users\<UserName>\AppData\Local\Microsoft_Corporation\<applicationName>.dll.manife_Url_rjnwjanz4pkudvybetihqcqjhxkip2s0\12.0.6514.5000\user.config

    now: C:\Users\<UserName>\AppData\Local\Microsoft_Corporation\<applicationName>.dll.manife_Url_rjnwjanz4pkudvybetihqcqjhxkip2s0\14.0.6514.5000\user.config

    I can understand why this happens because I'm using the default setting provider. However, I need a solution to resolve this issue, either some ways to migrate the settings to the new location or change the location of this file to a custom location.

    Also, can you tell me if there is a way to detect whether Outlook was upgraded to a newer version using VSTO or any other libraries during the first startup after the upgrade?

    Your help will be greatly appreciated!



    Friday, May 21, 2010 3:36 PM

All replies

  • Hello Rajat,

    As said in this blog, User.config files are also not supported for VSTO apps (in general, where the host application is native, like Outlook, Word or even IE). In these cases, you will need to write your own settings provider (which is quite easy to do, by the way, and there are good samples and docs in MSDN that describe how to do this) to be able to read/write user scoped settings. For this, you could refer to this thread: Have I mistaken this point? If yes, please feel free to let me know.

    For Outlook version, I think we could use Globals.ThisAddIn.Application.Version to check the current version of Outlook.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, May 25, 2010 7:52 AM
  • Hi Bessie,


    Thanks for your response. I'm not sure why it says it's not supported by VSTO but I have been developing VSTO application since the first edition. You're right that I can provide my own custom settings provider but at this point it is too much hassle to do that in my case. So, I was looking for an answer to why this file is not migrated to the different folder. One solution I have implemented is to copy it programatically to the new folder. But for this I need to check or detect whether the Outlook is running the first time after an upgrade.

    If you could get me this answer, that would be great!

    Thank you,


    Tuesday, May 25, 2010 6:42 PM
  • Hello Rajat,

    I am not sure I will totally help you. However, I find a thread discussed before which might give you some idea: usersettings & specific path. To detect whether the office application is running, as far as I know, we could use Process.GetProcessesByName method by code. For more information, you could refer to this thread:

    Hope this helps you,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, May 26, 2010 8:00 AM