View BizTalk orchestration code behind in VS2005 - visual-studio-2005

My BizTalk (2006) orchestrations open by default in design view. I need to see the file behind (which appears like XML). I don't know how to switch.
With winforms and the like, F7 is the 'go to code' shortcut but I can't find any equivalent for this.
The only thing which sometimes work is to search for a string which appears in the orchestration and within the code of BizTalk. I have done a search for my string within Search Files (under find) and the Find Results box shows me the string lives in MyFile.odx (and it displays the ). However, I can't get the actual code on screen as it only shows the design view.
So, just to make sure this is really clear, I want to switch between the 2 screen shots:
From the Design View:
to the 'code behind' view:

Right click -> Open with.. -> XML Editor

As a work around, I can open it from Windows Explorer in notepad. Not ideal, but at least I'm not stuck any more.

Related

VS2010: How to see GUI

I need to know how to open the form of a program I am debugging.
I loaded an existing solution into VS2010, I can see the code, but I want to see the GUI part of the project, click on buttons and see what part of the code they take me to, set breakpoints where I feel like.
I don't know how to see the GUI in VS2010, where can I do that?
Also, where would be a good resource to learn the ins and outs of VS2010?
Depending on how the UI was created, there may or may not be a way to see the UI at design time. Particularly if this is an older Windows UI application, it's likely that the windows are created entirely in code, and there is no design-time UI for you to see.
There is a dialog editor, for dialog windows that are defined in resource (*.rc) files. CTRL-SHIFT-E brings up the Resource Viewer and you can look for things under the Dialog node. It is possible that your main window is a dialog-style window, as that's one of the options you get when you create a new MFC-based application.
Otherwise, your only option to see what your UI looks like is to run the program and see. Tracking down which UI elements do which actions in your program will require finding the appropriate event handlers or message handler methods (again, depending on what UI framework, if any, is in use) and setting breakpoints.
The generic answer is:
Hit F5 to starting Debugging mode. (Or under the Debug menu choose Start Debugging)
But it depends on how your project is setup and what type of project it is if F5 will work that easily for you.
What kind of program/language are you using?
With a form, I believe you have to File-->Open-->Project/Solution
Now if its a website, you would open Website. If you tried to open a windows form under a website then you wont see the design.
Typically you would just double click your form name (form1.cs) because then your design view will pop up or hit Shift+F7 or rightclick --> view designer. Then just double click whatever tools you have on your form (like a button) and it will automatically go to the button code.
If its a website, then it would be under website1.aspx while the code sits in website1.aspx.cs
But if none of that helps, here is a good place to learn this stuff
VisualStudioWalkthroughs

Visual Studio - easy way to bring up type definition as source code

Oftentimes I want to bring up a system class in a source view, so that I can browse the properties and methods exposed by the class. Below is the screenshot of what I mean:
Srting from metadata http://img443.imageshack.us/img443/940/stringfrommetadata.png
Usually I do this by selecting the class name and pressing F12 (or right click>Go To Definition). However, if I haven't got it anywhere ready, i have type it up and then do Go To Definition. Most of the time I have to delete what I typed later on.
Is there a way to bring up this view without having to type the class name? The VS2010 Navigate To dialog doesn't support this.
EDIT: When I posted the question I didn't use any Visual Studio plugins. Now that I realised that I have full CodeRush license (thanks to StackOverflow promotion for users with 10K rep) I will accept answers that use CodeRush or Refactor!.
EDIT: At this stage I haven't really got anywhere with trying to answer this question. I am going to leave it open and let the bounty auto-award itself to Rory as he explained what's happening the best. In the meantime(schedule allowing) I will investigate doing this with DXCore as I think it should be possible.
The view you're looking at appears to have been built by some sort of analysis of the IL of the framework. Without knowing the type you intend to look at, no deconstruction can be done. Therefore I feel that, you are unlikely to find exactly what you have said you are looking for.
Allow me to suggest a few alternatives though.
Disclaimer: I work for DevExpress as a CodeRush Community Evangelist.
The Object Browser (Ctrl+Alt+J) This screen will load without attempting to show you any particular type, it will therefore be down to you to find the type in question. However all types are available and full search functionality is provided. once the type you're looking or is found, all members are listed and available.
Update: If you use the (Ctrl+K, Ctrl+R) shortcut to launch the object browser, then it will launch focused on the Search box. This is invaluable.
There are a number of CodeRush features which can prove useful when trying to locate code.
TabToNextReference (Tab) Whilst the caret is positioned within a type, strike the tab key and the next reference to that type will be located. More Details
References ToolWindow (Shift+F12) When activated the References ToolWindow will show you any references to the current type or member. This toolwindow can also be used to navigate said references. The References Toolwindow can be used in both on demand and Live mode. this allows you to have the window update as you navigate your code (via mouse or keyboard) and locate all references of any symbol the caret lands upon.
QuickNav (Ctrl+Shift+Q): This feature is closest in style to VS2010's NavigateTo feature. QuickNav will locate symbols matching whatever you type into it's filter box. This facility also supports Camel Case search. More details
QuickNav is also much more configurable than it's VS counterpart
Finally
Please also keep in mind that CodeRush is build upon the DXCore, a framework which allows users to create their own plugins for use alongside each other and CodeRush.
This framework has been repeatedly been leveraged by the community to add additional functionality. So even if you don't see any thing quite to your needs, consider suggesting something to the community by way of the forums or even contact me directly RoryB at DevExpress dot Com
I'm sure there's something we can do to help you out :)
I was not aware of that new "Navigate To" feature, but I used to use Reflector for this sort of things. The pro version offers some integration with Visual Studio (Right clicking the method and selecting "Open In .NET Reflector"). It will open the reflector window and won't show the code in the VS itself. You can watch the demo that shows this feature and some others.
This is not the best answer that I'd expect but is a good option to know.
There is no way that I know of to do this in Visual Studio 2010. However, you can do this in ReSharper via the 'navigate to' menu. I suggest you try the 30 day trial from them, then if you really do need this then purchase it.
A number of add-ins allow you to browse objects (though usually in an object-browser treeview manner rather than in a "header" file form - I believe Resharper, CodeRush and Visual Assist X all have variations on this theme).
However, one add-in to consider (as it's free) is the VS Productivity Power Tools. It adds a Solution Navigator window that gives a view onto your solution just like Solution Explorer, but (among other enhancements):
can search & filter the files listed, e.g. show only those files that are named Test.
can "expand" any file entry to show the types and members within it.

Customizing toolbar items in VS2010

Has the menu & toolbar customization functionality in VS2010 been reduced?
I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons.
Is this something that has suffered as a result of the move to the WPF-authored UI or am I missing something?
Seems like this functionality was cut from Visual Studio 2010. This post has some info in the comments: Customizing Visual Studio 2010
Specifically - "Unfortunately assigning or editing icons to commands through Customize dialog is not possible in VS2010. It is one of the features got cut for lack of time. This is however something we'll consider adding back in next version."
The reply also has a longer explanation of a workaround.
As noted in the link mentioned in the answer from #Gordon Mackie JoanMiro, the REASON for the reduced functionality is that the VS Shell team migrated the entire UI (shell and command system) from Win32 to one based solely on WPF. This was a gargantuan task, I would imagine. However, a couple workarounds are now available:
You can export previously saved settings from VS 2008 and import them into VS 2010. That includes command bar customizations (as noted by #Don)
A more recent blog-post contains detailed instructions for using a new extension to VS2010 (available on Visual Studio Gallery) that allows users to change the images on the command UI. (Note that the old drag&drop customization interface is still not supported in this new extension.)
If you have custom icons, any attempt to make ANY changes to the tool bar will result in the custom icons disappearing and being replaced by text when you restart VS2010.
The only way I found to get my custom icons without text into VS2010 is to open VS2008, set up all of the tool bars the way I want, including custom icons, then export the settings (Tools| Import and Export Settings). Then open VS2010 and import those settings. Tedious, I know, but it allows me to have a down arrow icon that searches for the next instance of the word my cursor is on.
I have been trying to customize VS2010 toolbars/keyboard and what took a few minutes in previous versions takes hours now. The new system looks real pretty but is useless in practice. Apart from the fact you just can't do (like change the appearance of buttons as mentioned above) the things you can do are extremely time-consuming and annoying.
Why is it every new version of VS loses something really useful? Other examples:
VC++5 introduced a new HTML help system. Pressing F1 on a function name used to immediately show help for that function. After VC++5 getting context help became annoyingly much slower, and is still very slow (and inaccurate).
VS.Net (aka VS2002 or VC++7) had a useless bookmark system compared to VC++6. VS2010 bookmarks are better but not perfect.
VS.Net removed the search state buttons "whole word", "case sensitive" etc. These were possibly the most useful buttons ever as they quickly allowed you to see why a search may have failed.
I found a great extension: CommandingImage
It does not have an icon editor, but you can create your images as 16x16 png format (for transparency) and import it (I recommend Paint.Net)
Dave, here's how to add toolbar buttons:
1) in the IDE, find the down arrow looking thing on the far right of a toolbar and click on Add Remove Buttons, Customize
2) in the Customize window select the Menu Bar radio button then select the appropriate menu bar that you want to add a button to
3) click the "Add Command..." button
4) select the appropriate Category and Command button that you want to add, then click OK.
The command button you selected will be added to the menu bar you selected. You can move the button up or down.
I think this is what you are looking for.
Good luck!

How do I view Visual Studio BuildLog.htm files without cutting and pasting into an external browser

This may or may not be specific to VS2005 (as that is the version I'm referring to for this question).
I find often the case is that I see this in the Output panel inside Visual Studio
2>Build log was saved at "file://c:\\vsdll_example\MyExecRefsDll\Debug\BuildLog.htm"
Now, since that looks and smells like a URL, I would have thought that I could simply left mouse click on it, or left mouse double-click on it, and a browser window of some sort would be displayed. No, that doesn't work. So, to view it, I have to cut and paste the "file://bla/bla/bla" part into an external window.
Is there a way to set up Visual Studio to allow me to browse to that file directly, or view it inside Visual Studio IDE, or something to that effect, without the extra fiddling with cutting and pasting? Or is there some type of keybinding I'm not aware of?
Thanks,
bg
Hold down Control while clicking on the link. It should show up in the editor.

How do I edit work items in the Visual Studio 2008 xml editor?

I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc.
The only reason to change the XML is if there's a bug in the Process Editor (the tool that gives the graphic designer). I have done extensive modifications of Work Item types and only had one instance where I had to change the XML.

Resources