Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I've been giving some work to do on an existing Outlook add on written in c#. I have no access to the original authors. This plugin utilises the C# Properties.Settings.Default object to store some data at user level. According to documentation the path to this file is:

<Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config

Where <Profile Directory> in this case is the users local appdata directory. <Company Name> should be taken from the AssemblyInfo.cs file, which has an entry [assembly: AssemblyCompany("company_name")].

My problem is that regardless of how I set company_name the file is always created in "Microsoft_Corporation" (the underscore is intentional). Is this a default behaviour of an Outlook Add on? or have I missed a possible reference somewhere in my code?

note: I've searched the code for "Microsoft_Corporation" to no avail.
Posted

1 solution

If I remember correctly...

User-scope settings are stored in the user's appdata folder. Application-scope settings are stored in C:\Users\My Name\AppData\Local\My_Company\. If your settings file doesn't contain any Application-scope settings, you won't have a company folder.
 
Share this answer
 
Comments
onceforgotten 5-Jan-11 9:28am    
The file is currently being stored in c:\users\my name\appdata\Microsoft_Corporation\. But the AssemblyInfo.cs file has the company name as my_company. This is the part that I'm confused about, I don't know where the "Microsoft_Corporation" company name is being generated. I've scoured the code for a reference to it but cant find one, so I wondered maybe if this was a standard behaviour of outlook add ons.

This page here http://blogs.msdn.com/b/rprabhu/archive/2005/06/29/433979.aspx has a nice faq about settings files, and mentions a "fallback" if the company attribute in assemblyinfo is missing, but it doesn't say what that fallback is, and as I said, the name is present in my assemblyinfo.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900