0

In order to organize some T4-generated files within my solution, and per this excellent answer, I have a .reg file that I use to add a key and three values under the following Visual Studio registry key (currently formulated for VS 2015):

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\

Periodically and intermittently, I find that this key has been overwritten and I must run my .reg file again to restore my custom Visual Studio behavior. I have seen this happen every few months or so, for many years, across several versions of Windows and VS, on many machines, and three different domains (on one of which I am sole admin). There's no obvious (to me) temporal association between the overwrites and either Group Policy or Visual Studio Updates, so my best guess is that either Visual Studio is periodically performing some sort of self-"repair", or else certain Windows Updates are overwriting these keys for some reason.

What mechanism is likely causing this (or how could I go about detecting it myself)?

More importantly, what method would be the best practice to either prevent the overwrites or automatically "repair" them when they do disappear? I know I could probably use group policy (where I am a domain admin) to force the registry entries, but I don't have GPO admin rights at every site where I work, and I'd prefer an option that was less ServerFault-y and more StackOverflow-y, particularly because I haven't yet identified the root cause.

Mat
  • 470
  • 7
  • 12

1 Answers1

1

You can think of the 14.0_Config key as a volatile cache of VS’s configuration data for a particular user. It is simply the combination of HKLM\Software\Microsoft\VisualStudio\14.0 and any pkgdef files coming from VS extensions.

Source: All Your RegKeys Are Belong To Us

So, in addition to 14.0_Config you can try to add your registry data to the 14.0 key.

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66
  • As an experiment, I tried removing my settings from 14.0_Config and using the 14.0 key only. Even after a restart, the settings did not "copy" to 14.0_Config (nor did they work anymore). As you suggested, I'm going to write the keys to both locations to see if it helps in the long run; however, I couldn't help but notice there was no top-level RelatedFiles key at all under 14.0. I think I'll have to wait to see if this prevents a recurrance. – Mat Aug 16 '17 at 13:11