Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / December 2004

Tip: Looking for answers? Try searching our database.

Save customized toolbar settings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas Pagh - 02 Dec 2004 10:13 GMT
I usually customize my toolbar to match my specific needs when working in
visual studio.
Whenever I upgrade VS, Incredibuild, TestTrack or some other Add-in, my
toolbar is reset to default - sometimes I even get a warning about, but
there's nothing I can do about it...or is there??? please tell me I can do
something, it takes an awfull lot of time to start over with the
customization.

Q: How can I save my customized toolbar settings, so I can restore my
settings whenever something f.... things up? Can I export them, or find them
in an xml doc that can be backed up, or can i copy and paste the toolbar
settings from within some document, or can I create my own bar (like the
"build", "debug" and "standard" bar) in a file, hardcode its setup, and use
it as an add-in???
Please help me, any other solution, than starting over each time I upgrade
my environment will do.

Regards, Thomas Pagh
Dmitriy Lapshin [C# / .NET MVP] - 02 Dec 2004 10:56 GMT
Hi,

There is an XML file where these settings are stored. On my machine, this
file is located here:

D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.xml

Bad news are that you cannot just back up and restore this file after the
upgrade as the newly installed add-in has most likely added its own toolbars
to the saved layout. You can of course compare the current and the saved
files and merge them somehow, but this is anything but simple.

Signature

Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

>I usually customize my toolbar to match my specific needs when working in
> visual studio.
[quoted text clipped - 16 lines]
>
> Regards, Thomas Pagh
Thomas Pagh - 02 Dec 2004 12:31 GMT
VS doesn't seem to store the buttons/commands i add/delete to/from the
toolbar in the file you mentioned, which is C:\Program Files\Microsoft Visual
Studio .NET 2003\Common7\IDE\devenv.xml on my machine.

I took a copy of the file, then I opened Visual Studio and chose
tools-customize..., there i added and removed buttons from my toolbar, and
exited VS.
Then I compared the recent copy of devenv.xml with the current devenv.xml
using Windiff.exe, and there where no changes (Date Modified on the file
properties didn't change either).

Is there any other file I should be looking into, or perhaps the Registry?

Sincerely, Thomas

> Hi,
>
[quoted text clipped - 28 lines]
> >
> > Regards, Thomas Pagh
"Ed Dore [MSFT]" - 02 Dec 2004 23:10 GMT
Hi Thomas,

I spent many weeks trying to figure out a way to do what you're looking for
(even after the dev team told me it couldn't be done). Sadly, I never
actually found a way to do this. DevEnv.XML is where the window layout for
the various IDE modes (Debug, Design, etc) is stored. The CmdUI.prf is the
file that named commands are persisted to.  Note, I do believe this will
not apply to the next version though.

This is a really big problem, and the VS team is putting the ability to
save and restore your settings in the next version. But for the current
versions I have yet to find a way to do this. Part of the problem is that
we basically inherited the toolbar stuff from Office, and the automation
model on those commandbars don't allow for recreating the stock commandbars
and buttons you see in VS .Net. You can add new command bars and controls
and even move existing ones around. But there's no way to recreate them. At
least nothing I could come up with after playing with the model for several
weeks.

Sincerely,
Ed Dore [MSFT]

This post is "AS IS" with no warranties, and confers no rights.
JD - 06 Dec 2004 00:04 GMT
What about devenv.xml under C:\Documents and
Settings\"Current_User_Name"\Application Data\Microsoft\VisualStudio\7.1?
This is the user customized layout, if you delete this file the default
devenv.xml from IDE folder will be loaded.
Ed Dore [MSFT] - 08 Dec 2004 03:47 GMT
Hi JD,

Not sure what your question is here. The window layouts for the various IDE
modes (like design mode, debug mode, etc) are stored in devenv.xml. When you
delete it, we replace it with a default version of devenv.xml as you state.
But that's mostly info about window layouts, not named commands. Named
command information (the stuff that typically gets displayed on your
toolbars and menus) is actually stored in CmdUI.prf. Neither file format is
published, and one look at devenv.xml was enough to scare me away from it
:-)

The dev team answered this question when we first shipped VS 2002, saying
that you couldn't save/restore the command bar state in VS .Net. Suffice to
say, I wasn't really convinced. After a lot of experimentation and weeks of
digging through the MSO codebase, I'm pretty much inclined to accept that as
fact now. I proably should have just believed them in the first place, but
was thinking I could figure out a way that maybe someone hadn't noticed. We
basically reused the Office commandbar stuff, so my thinking was that there
might have been something there I could leverage. Unfortunately, there
really wasn't. At least, nothing I could find after spending a few weeks
experimenting and code snooping, before giving up. On a better note though,
we are working to fix this for VS 2005.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.