Where Visual Studio Extnesions DialogPage are stored? - visual-studio

I'm developing a Visual Studio extension for Visual Studio 2017. In my extension, I have a class inheriting DialogPage to allow the user to define parameters.
I want to see exactly what gets serialized when settings are changed.
According to Options and Options Pages article in MSDN the data should be stored in the registry but I couldn't find it.
Where are the settings are stored for Visual Studio options page?

According to following blog, VS2017 support multiple instances of VS install on the same machine. So the settings were moved out of the registry. Each instance also has its own private registry so they can be configured independently.
https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/
You could find the private registry for your Visual Studio 2017 from C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\15.0_XXXExp ("XXX "could be any numbers, just find the folder suffix is "Exp").
And you could open this settings file with regedit.exe. Detailed steps, please refer to:
http://www.visualstudioextensibility.com/2016/11/23/some-implications-of-the-new-modular-setup-of-visual-studio-2017-for-vsx-developers/

Related

How do I manage a private gallery in vs 2017 using registry like I did in vs 2015?

How to: Manage a Private Gallery By Using Registry Settings https://msdn.microsoft.com/en-us/library/hh266735.aspx?f=255&MSPPError=-2147217396
The above article details how I am doing it in 2015 by modifying the registry but the problem is that VS does not store this info in the registry anymore (I don't think so). It used to be in the ExtensionManager folder in vs 2015 ([HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\ExtensionManager\Repositories...) but that folder no longer exists (along with 30 or so others that are missing).
Supposedly VS stores them in a private registry now:
https://learn.microsoft.com/en-us/visualstudio/extensibility/breaking-changes-2017#visual-studio-registry
I don't understand if I will be able to use the registry in the same way as before and if not, what is the recommendation for the easiest way to do that...basically we use the registry to install our private VS extension gallery into developers machines by simply clicking a .reg file so they don't have to set that up themselves...actually same same as what this answer says: Programmatically specify Private Extension Gallery in Visual Studio 2012
I'd rather not create an atom feed but if thats the last resort then i'm all ears.
Thanks

Visual Studio 2015 Find in Files not remembering file types or locations

I rely on the Find in Files dialog in Visual Studio a great deal. (Sometimes Intellisense/Resharper just don't cut it.) Since upgrading to 2015, I've noticed that the dialog doesn't remember my custom "Look in" paths or "Look at these file types" lists between sessions.
If I close my solution and VS instance, then reopen, I have to enter my custom path and file types again. Huge waste of time. Has anyone run else run into this? Any workaround? 2013 used to remember this stuff.
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081
Installed Version: Professional
I've never had any problems with it not remembering my settings, but I imagine that you could run a custom registry modifier to add the appropriate keys, you could make sure your settings are always pristine. The custom search information is stored in HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find.
The file types are stored in a string key called Filter with whatever you would normally input into the custom file type category in the VS search window. For example searching for only .cs and .txt files you would put *.cs;*.txt.
The folders are located in a string key called Query with values such as C:\Folder1;C:\Folder2. However, it's behavior seems a little weird. You have change the value of Query and a Query+integer value (i.e. Query0) to the same value to have it appear in Visual Studio.
If you just run a script to modify the above values to the files types/folder locations you want, that should work.
I ran into this today. After much searching I found a post on the visual studio forums somehow. This pointed me towards ReSharper. This directed me towards a workaround.
Start visual studio in safe mode with the command line argument /SafeMode
Create the folder sets you want for searching
Restart visual studio not in safemode
Once I had restarted all my created custom searches remained, and the registry values were created. This might not work in the specific case, but this worked for me.
You can set these values programmatically inside Visual Studio for the Find and Replace dialog (for example with Visual Commander):
DTE.Find.FilesOfType = "*.txt";
DTE.Find.SearchPath = #"c:\temp";
If you have an earlier version of VS, export the environment settings, copy the NumberOfScopes and NamedScopes* settings from the Environment_UnifiedFind section to the same section in your VS2015 settings file and then re-import settings.
Once I did this, it allowed VS2015 to start saving folder specifications for future settings exports.
Or you could try replacing this in your VS2015 export:
<PropertyValue name="NumberOfScopes">0</PropertyValue>
With this:
<PropertyValue name="NumberOfScopes">1</PropertyValue>
<PropertyValue name="NamedScopes>0">FOLDER_SPEC_NAME>SEMICOLON_SEPARATED_LIST_OF_FOLDERS>{4A812F3C-7B1A-4987-9769-461F20EB25CB}</PropertyValue>
(Don't forget to re-import after you make the change)

How to get an addin to load in Visual Studio Experimental

I'm developing an addin for visual studio (2010) and want to debug it. I found about the experimental instance of visual studio from here:
http://blogs.microsoft.co.il/blogs/oshryhorn/archive/2011/03/09/experimental-instance-of-vs-2010-safe-and-easy-debugging.aspx
However it doesn't go on to say how to register the addin for the experimental version only. I tried adding a folder key to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp_Config\AutomationOptions\LookInFolders but when starting the experimental instance my new key gets deleted and it never reads the .addin file (which works if i put in the normal place and run the normal instance of VS so that bit is OK)
Try the following
Shut down all instances of Visual Studio
Add your folder to the "VisualStudio\10.0Exp\AutomationOptions\LookInFolders" key (not 10.0Exp_Config).
You will likely need to manually add both "AutomationOptions" and "LookInFolders"
After this new instances of Visual Studio looking at the experimental hive should see your folder.
Alternatively you can just add this through the options menu in the Visual Studio Experimental Instances.
Tools -> Options
Environment
Add-in / Macros Security
Add your folder via the "Add" button

Copying visual studio 2010 installed extensions options to another computer

I have visual studio 2010 installed and configured with some extensions at my home computer. Now i want to copy all installed extensions settings from my home computer to work computer, how can i do that?
I can copy visual studio settings via import/export dialog but this not work for extensions settings.
I would look in this directory
%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions
That is where the extensions are stored, copy that to your new PC.
I'm not sure if this will work 100% but you can give it a shot.
Visual studio extension settings are stored in the registry:
HKCU\Software\Microsoft\VisualStudio\<version>\DialogPage\<extension>
if they implement the default extension settings mechanism.
Otherwise you'll have to go to the individual extension website to see where they store their settings.
It is under one of the directories in AppData\Local\Microsoft_Corporation. Each extension has a user.config file stored.
For VS 2013 you can find them by this (not sure if this also works for VS 2010 but maybe it helps someone):
var config1 = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
MessageBox.Show("Config path: " + config1.FilePath);

Visual Studio 2010 with phone tools - Any advanced/configurable settings?

In Visual Studio 2008, there was the device manager for setting up additional templates and options for the emulator. None of these options are available with Visual Studio 2010 which I understand as the features were removed.
When the Phone Tools are installed, the device target box comes back but there are no options at all.
Basically, I was just wondering where this list gets its options from and if there is any way at all to configure it?
The closest I got to was find the %LocalAppData%\microsoft\phone tools folder, but not sure this is correct as it appears to be more related to the emulator itself (e.g. if deleted, it gets recreated when you run.).
(Link to something a post that helped me years ago)
It took me a while, but it looks like I have found it.
I was on to the correct path with %LocalAppData%\microsoft\phone tools. All the targets are in the conman_ds_platform.xslt file.
I have no idea why they no longer provide an interface for customising - but it looks to me that despite MS taking the feature out of Visual Studio, it is still possible to customise this and add your own devices just fine.
... Next, depending on time, I will try to convert the Windows Mobile/CE project templates to VS 2010 and see if it is possible to do full development on Visual Studio 2010.

Resources