Reputation: 404
I have a C# excel add-in project which uses the User Settings.
The file is saved in a weird location, I guess that it is the default one. But as far as I understand, the location is derived from information taken from the AssemblyInfo.cs file.
In theory the path should be:
C:\Users\jeremy\AppData\Local<Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config
But in my case, the user.config always ends up in:
C:\Users\jeremy\AppData\Local\Microsoft_Corporation\C__Users_jeremy_Path_u1gevrwm5dgrhpsynfqgtuhhmlxzqlm4\14.0.7132.5000\user.config
I double checked and information like Company Name or Version are well defined in my Assembly file. They are somehow ignored. It causes me a lot of trouble because I have 2 applications which should be using their own user.config files, but because of this issue they write in the same file...
For info, I'm building my executables with Wix.
Do you have any hints to solve that?
Upvotes: 1
Views: 185
Reputation: 404
I'm still not sure why I'm having this weird path, it might be because of the nature of the software which is a VSTO add-in.
In any case, I solved my issue by implementing a custom settings provider. It is a big overhead but I couldn't find any other solution.
Here's a very good tutorial: http://www.geek-republic.com/2010/11/c-portable-settings-provider/
Upvotes: 0