Showing posts with label Settings. Show all posts
Showing posts with label Settings. Show all posts

Tuesday, April 03, 2012

How to: Share Visual Studio Settings Between Computers or Visual Studio Versions

There's a real cool functionality that's built into Visual Studio that allows me to set up the Visual Studio environment just the way I like it, then I can export those settings out and then import them into another instance of Visual Studio. So say I have Visual Studio running on my development machine at work then I have a copy of Visual Studio on my laptop so that I can work at home or work on the weekends, or whatever. It'd be really cool if both of these environments matched. It's going to help productivity. It's going to make it easier for me just to live and get around. Well, first thing, if we go to Tools, Options I want to show you something. There's an Import-Export Settings and yours may look like this.

1

You will have to expand Environment and you will see Import Export Settings. Now it's going to tell you that I can use team settings files if I'm using a team server or I can automatically save my settings to this particular file. And if I click Browse I can jump out and put it wherever I would like, but you can notice by default here.

image

if I just click up here in the text box, the drop-down box, it's going to put it on C:\Users\nagasai\documents\Visual Studio 2010\Settings folder. And then I can give it a name, whatever I would like. So this is where I can work with that. Now, what's really cool is, if I go back to Tools you will notice down here we've been going to Options but right above Options is an Import and Export Settings, and so I will click on that and you will notice that I can export selected environment settings, or I can import. Well, let's say that I want to save the settings that I have out, so I click Next. And notice it says, What do you want to send out? I want all my Code Analysis, Database Tools, General Settings, my Team Foundation Server settings, and then notice on Options it's saying wait a minute. You've got some things here that you may want to go take a look at, and it is saying I may have some things on the Import-Export Settings that I need to go take a look at. This is warning me, notice up here, that it might expose intellectual property or other sensitive information, and so it's saying not to choose those and I can read F1, but for now we're just going to leave that alone. Actually, I'll just clear that for now, and I'll just choose Next and it's asking me, what do you want to name your settings file? And I will just call it MTL Exported VS Settings and I will tell it where to save those, and actually, just for the purpose of this I'll put it on the Desktop and I will click Save and then I will click Finish and notice my settings were exported out there.

3

Now if I minimize this and let me just make this easy on myself and go out to the Desktop, notice there are my exported files, so all I have to do is put that on a thumb drive, take it to another machine and import it into another Visual Studio instance and I will have everything there just like I wanted. Now, let me go back to something else. If you remember, I talked about this particular little guy right here that shows up the first time you start Visual Studio. Well, what if you chose something here that you don't like and now you want to go make a change to that? After the first time that you see this screen and you make a choice here and start Visual Studio you will never see this particular dialog box again. So what we're going to have to do to make changes to that, if you ever want to, is go into Import and Export Settings and you can tell it that you can Reset All Settings and you can say just Reset, and notice it's going to take you right back to that same screen with a couple of differences and I can say, you know what, just give me General Development Settings, or give me Visual Basic but let's say that we want to go back to General.

 

Now we just click Finish and it's resetting them and now when we start up we're going to see, in all of our projects and everything, General Settings out there.

image

image

So I hope this doesn't confuse you, but the way Microsoft did that with that screen, that dialog box popping up the first time and then never coming back, a lot of people are like, well, wait a minute. I don't like the choice I made. How do I get back to that and make changes on it? So, very easy to import and export settings so that you have the consistent environment across all your copies of Visual Studio. So, make sure that you use that to set up multiple copies so that you're the same everywhere you go

Hope this helps…Smile