Sharing settings file between projects in VS2013

.net, c#, settings, vb.net, visual-studio-2013

Solution

I usually put these things in a common library. When sharing settings, you probably share more than just that, so combine it then. When marking the settings as public instead of internal, you can access them across the other projects.

For future reference:

The solution was to add the Settings file 'as link' to the project, right click and hit 'Run Custom Tool' where the Custom Tool property of the Settings file is 'SettingsSingleFileGenerator'.

Note that this solution is not favored, since it depends on manually updating the settings designer file by performing the above actions.

Problem

I have multiple projects that are accessing the same settings (they were a single project, but I'm re-factoring). What I would like to do is the equivalent of: ``` "Add Existing Item" -> "Add Link" ``` The projects are a mixtutre of both C# and VB. When I try to do add as link, it does bring the settings file in, but it doesn't recognise it. I actually get the error when trying to load the settings: ``` Error HRESULT E_FAIL has been returned from a call to a COM component. ``` Is there a way to tell the project to use a specific settings file (either inside or outside the IDE)?

Original source