If opening a xaml file in the designer is painstakingly slow you can dramatically improve the load time by simply turning off “Automatically Populate Toolbox Items”.
Thursday, December 22, 2011
Friday, February 25, 2011
Productivity Power Tools introduces Find, Organize Imports for VB, Enhanced Scrollbar, Middle-Click Scrolling and more!
MS has released an updated version of the productivity power tools.
Resetting Your Extensions for the Last Time!
We've heard a great deal of feedback on how each update of the Productivity Power Tools re-enables all of the extensions when it installs. If you are careful about installing the Power Tools via the extension manager or as long as an instance of Visual Studio is running, this version of the Productivity Power Tools will be the last which resets the extensions.
Please note: If you are running Visual Studio 2010 SP1 (Beta) that you will need to uninstall previous versions of the Productivity Power Tools prior to upgrading due to a change in the digital signature for the Power Tools
Find
There are many different ways to find within Visual Studio (Incremental Search, Quick Find, Find in Files, Find Toolbar, etc) and it often isn’t clear which is the best for a given task or worse these options even exist. The find dialog itself also can obstruct code and jump around while users are searching. Our solution to these problems is the new Find extension. In the screenshot below, you will see that we’ve turned the quick find & incremental search experiences into a find pop-up that is available at top right hand corner of the editor. After hitting, Ctrl+I or Ctrl+F, it simply highlights the find results as you type. From this small but powerful pop-up, you have access to most of the Quick Find functionality such as replace, options to match case and added support for matching .NET Regular Expressions!

Release notes:
- As an extension, it was only possible to implement these changes for the code editor. You still must use Quick Find for searching in designers and other non-editor tabs.
- .NET Regular expressions are only available in the Find extension. Find in Files will continue to use VS Regular expressions
- Feel free to email us your feedback: VSFindFeedback@microsoft.com
Enhanced Scrollbar
We’ve been looking into ways that we can improve the experience of navigating through code files. Our solution is the source map which has three modes that will allow you to more easily see the interesting artifacts in your files (edits, breakpoints, bookmarks, errors, warnings etc) and make it easy for you to navigate between them. The default mode is the “scroll bar only mode” which overlays icons onto the standard scrollbar to allow for viewing of these artifacts. In the source map mode, we’ve replaced the default scroll bar allow you to click on any item on the scrollbar to navigate directly to it. This source map mode also provides a preview of the part of the document as you hover. Finally, we have the detailed source map mode, which allows you to get a zoom out view of your entire file. You can switch between any of these modes by right-clicking on the scroll bar or going to Tools Options>Productivity Power Tools>Source Map where we have a host of other options that you can configure.
Middle-Click Scrolling
The ability to do middle click scrolling in Visual Studio 2010 has been a top request from our beta customers that we weren’t quite able to get into the release. With this extension you can press down on your scroll wheel and the move the mouse to quickly scroll through your document!

Organize Imports for Visual Basic
As part of theco-evolution strategy for Visual Basic and C#, we continue to bring the best features from each language experiences to the other. With Organize Imports for Visual Basic we’ve added yet another feature to that list. From the context menu, it allows you to sort the imports logically and remove the ones that aren’t being used.

Add Reference Support for Multi-Targeting
“How come I can’t add a reference to System.Web?” Many users have scratched their heads trying to figure out why certain dlls aren’t showing up in the Add Reference dialog. The confusion has been caused by the logic in the Add Reference dialog which filters out assemblies that are not valid on the .NET Client Profile which many of Visual Studio templates target by default. The Productivity Power Tools solution is to grey out the assemblies which are not available in the current framework profile. When you try to add them, it will automatically prompt you to re-target to a profile of the same framework which does support them.

Options in HTML Cut/Copy
Productivity Power Tool users have asked for the ability to tweak the html format which gets copied to the clipboard and with the release you now have the ability to customize that to suite your needs. Simply go to Tools Options>Productivity Power Tools> HTML Copy

This release of the extension also fixes the commonly reported bug where Cut/Copy occasionally fail which was fixed in VS 2010 SP1 Beta but was present in the October release of the Productivity Power Tools.
Thursday, November 04, 2010
SQL Server Compact Toolbox
SQL Server Compact Toolbox add-in for Visual Studio 2010. Supports both version 3.5 and 4.0 of SQL Server Compact.
Adds several features to help your SQL Server Compact development efforts:
- Script tables, including data
- Script entire schema, optionally with data, both of SQL Server Compact and SQL Server 2005 or later databases
- Import to SQL Server Compact from a SQL Server 2005/2008 database or a CSV file
- Migrate from SQL Server Compact to SQL Server and SQL Azure
- Basic, free form query execution
- Parse SQL scripts
- Display graphical estimated execution plan
- Generate detailed DGML files for visualizing table columns and relationships (requires VS 2010 Premium or higher to view)
- Create and manage Merge Replication subscriptions
For support, full source code, a standalone version for 4.0 and feedback, go to:http://sqlcetoolbox.codeplex.com
For users not having Visual Studio 2010 Pro or higher installed, an add-in for 3.5 with similar functionality for the free SQL Server 2008 Management Studio Express and also command line versions are available here:http://exportsqlce.codeplex.com
New in version 1.6:
- Export to SQL Azure
- Launch the Toolbox directly from Server Explorer!
- Beta testing of Db Diff (scripting of database differences)
- other bug fixes, see http://sqlcetoolbox.codeplex.com/SourceControl/list/changesets




Friday, August 20, 2010
VS2010 Toolbox Search
The visual studio team has added the ability to search for controls in the toolbox by name. To use it, put focus in the toolbox (by clicking in it, for example) and then start typing the name of the control you want to find. As you type, the selection will move to the next item that matches what you've typed so far. The text you've typed is shown in the status bar, like this:
Thursday, August 12, 2010
Visual Studio 2010 Bug; "Insufficient avaiable memory to meet the expected demands..." on cut and paste!
"Microsoft Visual Studio" "Insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation. Please try again later."
Tuesday, July 27, 2010
Class Designer PowerToys for Visual Studio 2010 is Released
It has many cool features like pan/zoom window, floating properties window, fast navigation, etc. You could find the detailed feature list in its help document which is available on the desktop after the Class Designer PowerToys is installed.
Besides the binary, the source code is also available. You could extend the PowerToys easily.
This set of add-ins augments existing functionality in the Visual Studio Class Designer and the Distributed Systems Designers. It now supports Visual Studio 2005, Visual Studio 2008 and Visual Studio 2010. The Design Tools Enhancements add-in provides a common set of features that can be used by both the Class Designer and the Distributed System Designers, such as pan/zoom window and rich formatting commands. The Class Designer Enhancements add-in provides additional functionality for the Visual Studio Class Designer, such as HTML export and nested type creation commands. This download includes all necessary source code and a Visual Studio project template for creating your own add-ins for the Visual Studiodesigners. The Class Designer is a developer productivity tool available in Visual Studio Standard Edition and above, which allows developers to easily visualize, design, refactor, and document their code. The Distributed System Designers enable software architects, operations managers, and developers to visually design service-oriented solutions and validate them at design time against their operational environments. The Distributed System Designers are a core component of Visual Studio Team Edition for Software Architects and the Visual Studio Team System.
http://modeling.codeplex.com/releases/view/49473
Thursday, July 15, 2010
WCF Peer to Peer
I am working on a project that requires a modified peer to peer design and found the following links very helpful;
Peer To Peer Programming with WCF and .Net 3.5 by Amit Bahree and Chris Peiris
http://msdn.microsoft.com/en-us/library/cc297274.aspx
Here are some great webcasts on Channel9 regarding the topic;
Peer to Peer Series Part 1: Intro to PNRP
Peer to Peer Series Part 2: Registering Names with PNRP API
Peer to Peer Series Part 3: Resolving Names Synchronously with the PNRP API
Peer to Peer Series Part 4: Resolving Peer Names Asynchronously
Peer to Peer Series Part 5: Direct Connect Peers via WCF
Peer to Peer Series Part 6: Introduction to PeerChannel
Tuesday, June 22, 2010
Visual Studio 2010 Pro Power Tools Released!
http://bit.ly/alyr2C
Revision Notes
10.0.10608.1630
Fixed issue where Visual Studio may crash on startup on computers where proxies required user entered credentials.
Visual Studio 2010 Productivity Power Tools
A set of extensions to Visual Studio Professional (and above) which improves developer productivity.
Document Well 2010 Plus (More Info)
One of the key pieces of feedback that we have received over several versions of Visual Studio is that users want to be able to customize the behaviour of their document tabs. From the ordering of tabs to the position of the close buttons, user can now configure dozens of different options for their tabs. Go to Tools -> Options -> Environment -> Document Tab Well to configure these options as you prefer:
Tab Well UI
Scrollable tabs
Maintain spatial consistency of the documents that are included in the document well.
Vertical tabs
Document tabs are shown vertically, allowing you to fit more tabs than are normally visible when shown horizontally.
Pinned tabs
Allows you to pin tabs to keep them always visible and available.
Show close button in tab well
Similar to Visual Studio 2008, will show a close button in the document well that will close the active tab.
Tab Behavior
Remove tabs by usage order (LRU)
When a new tab is inserted and existing tabs don't fit in the document well, instead of removing the tab at the end of the well it will remove the least recently used tab. This ensures that frequently used tabs are readily available.
Show pinned tabs in a separate row/column
Pinning tabs can quickly cause you to run out of space for regular tabs. The option allows you to always show pinned tabs in a separate row (or column, if displayed vertically) from regular tabs.
Sorting
Sort tabs by project
Tabs will be sorted by the project they belong to, thus keeping them always together in the document tab well.
Sort tabs alphabetically
Tabs will be sorted alphabetically. When Sort By Project is turned on, tabs will be sorted first by project and then alphabetically.
Sort tab well dropdown alphabetically
The drop down menu at the right end of the document well is sorted alphabetically. This option allows ordering as the tabs are laid out in the document well.
Tab UI
Color tabs according to their project or according to regular expressions
This option permits tabs to be colored according to the project they belong to. This is particularly useful when sorting tabs by project, as it allows you to immediately identify different groups of project documents.
You can also configure regular expressions and assign a color to each one. If the name of a tab matches the configured regular expression, it will be colored with the assigned color.
Miscellaneous options that modify tab UI
Show document/toolwindow icon in tab
Show close button in tab
Modify dirty indicator style
This option allows you to select from a set of different dirty indicators that you might prefer over the asterisk.
Modify minimum and maximum tab size
Allows you to modify minimum and maximum tab size. Try setting minimum and maximum sizes to the same value, and you will have evenly spaced tabs.
Searchable Add Reference Dialog
The new Add Reference dialog makes it faster and easier for you to find the reference that you are looking for and add it to your VB, C# or F# project. From the Solution Explorer, simply right click on the References node, select the Add Reference command to see the updated Add Reference Dialog.
Highlight Current Line
As the resolution of monitors increases, it’s becoming more difficult to find the caret in the code editor. The highlight current line extension makes it easy to find the caret by highlighting the line that the caret is on in the editor. You can even configure the default colour by changing the setting for “Current Line (Extension)” and “Current Line Inactive (Extension)” in Tools Options Fonts & Colors.
HTML Copy (More Info)
This extension provides support for the HTML Clipboard format when copying code from the editor. This means that you’ll no longer have to go fix up the formatting of your code when you paste it into a TFS bug form or any other HTML based control.
Triple Click
It’s never been easier to select a line of code from the mouse by simple triple-clicking anywhere on the line.
Fix Mixed Tabs
Some developers prefer tabs, others prefer spaces, and nobody likes mixing tabs & spaces. This extension promotes developer harmony by warning as they are open or save a file that has a mixture of tabs & spaces. The information bar also provides an easy way to fix the file to suit your preference.
Ctrl + Click Go To Definition
This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key.
Align Assignments
This extension is useful for making your code a little more readable by aligning the assignments when you type Ctrl+Alt+]
Please note: This may conflict with your formatting settings. E.g. in C# you will need to disable: Tools->Options->Text Editor->C#->Formatting->Spacing->"Ignore spaces in declaration statements"
Colorized Parameter Help
This extension improves consistency with the editor by applying syntax highlighting to the contents of the Parameter Help window for C# &VB.
Move Line Up/Down Commands
This extension maps the Alt+Up Arrow & Alt+Down Arrow keys such that they will move the current line of code or the selected lines up and down through the editor.
Column Guides
Since Visual Studio 2002, there has been a not so secret registry key which allowed user to draw a vertical line in the code editor. This is very useful to remind developers that their full line of code or comments may not fit one a single screen. Thanks to this extension this feature has returned with UI configure it. Simply place the cursor at the appropriate column and select Add Guideline from the context menu
PowerCommands for Visual Studio 2010
http://bit.ly/9SOxFl
PowerCommands 10.0
PowerCommands 10.0 is a set of useful extensions for the Visual Studio 2010 adding additional functionality to various areas of the IDE. Visit the VSX Developer Center at http://msdn.com/vsx for more information about extending Visual Studio.
Below is a list of the commands included in PowerCommands for Visual Studio 2010 version 10.0.
Enable/Disable PowerCommands in Options dialog
This feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable.
Note: All power commands are initially defaulted Enabled.
Format document on save / Remove and Sort Usings on save
The Format document on save option formats the tabs, spaces, and so on of the document being saved. It is equivalent to pointing to the Edit menu, clicking Advanced, and then clicking Format Document. The Remove and sort usings option removes unused using statements and sorts the remaining using statements in the document being saved.
Note: The Remove and sort usings option is only available for C# documents.
Note: Format document on save and Remove and sort usings both are initially defaulted OFF.
Clear All Panes
This command clears all output panes. It can be executed from the button on the toolbar of the Output window.
Copy Path
This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer:
The solution node; A project node; Any project item node; Any folder.
Email CodeSnippet
To email the lines of text you select in the code editor, right-click anywhere in the editor and then click Email CodeSnippet.
Insert Guid Attribute
This command adds a Guid attribute to a selected class. From the code editor, right-click anywhere within the class definition, then click Insert Guid Attribute.
Show All Files
This command shows the hidden files in all projects displayed in the Solution Explorer when the solution node is selected. It enhances the Show All Files button, which normally shows only the hidden files in the selected project node.
Undo Close
This command reopens a closed document , returning the cursor to its last position. To reopen the most recently closed document, point to the Edit menu, then click Undo Close. Alternately, you can use the CtrlShiftZ shortcut.
To reopen any other recently closed document, point to the View menu, click Other Windows, and then click Undo Close Window. The Undo Close window appears, typically next to the Output window. Double-click any document in the list to reopen it.
Collapse Projects
This command collapses a project or projects in the Solution Explorer starting from the root selected node. Collapsing a project can increase the readability of the solution. This command can be executed from three different places: solution, solution folders and project nodes respectively.
Copy Class
This command copies a selected class entire content to the clipboard, renaming the class. This command is normally followed by a Paste Class command, which renames the class to avoid a compilation error. It can be executed from a single project item or a project item with dependent sub items.
Paste Class
This command pastes a class entire content from the clipboard, renaming the class to avoid a compilation error. This command is normally preceded by a Copy Class command. It can be executed from a project or folder node.
Copy References
This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes.
Paste References
This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node.
Copy As Project Reference
This command copies a project as a project reference to the clipboard. It can be executed from a project node.
Edit Project File
This command opens the MSBuild project file for a selected project inside Visual Studio. It combines the existing Unload Project and Edit Project commands.
Open Containing Folder
This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node
Open Command Prompt
This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively.
Unload Projects
This command unloads all projects in a solution. This can be useful in MSBuild scenarios when multiple projects are being edited. This command can be executed from the solution node.
Reload Projects
This command reloads all unloaded projects in a solution. It can be executed from the solution node.
Remove and Sort Usings
This command removes and sort using statements for all classes given a project. It is useful, for example, in removing or organizing the using statements generated by a wizard. This command can be executed from a solution node or a single project node.
Extract Constant
This command creates a constant definition statement for a selected text. Extracting a constant effectively names a literal value, which can improve readability. This command can be executed from the code editor by right-clicking selected text.
Clear Recent File List
This command clears the Visual Studio recent file list. The Clear Recent File List command brings up a Clear File dialog which allows any or all recent files to be selected.
Clear Recent Project List
This command clears the Visual Studio recent project list. The Clear Recent Project List command brings up a Clear File dialog which allows any or all recent projects to be selected.
Transform Templates
This command executes a custom tool with associated text templates items. It can be executed from a DSL project node or a DSL folder node.
Close All
This command closes all documents. It can be executed from a document tab.
Tuesday, May 18, 2010
Silverlight 4 Tools for VS 2010 and WCF RIA Services have shipped
Wednesday, May 12, 2010
Jarek Kowalski – Nlog Founder
I have been using Nlog for a number of years and find it to be a great logging component. Today my post on loadFromRemoteSources which deals with referencing assemblies from remote network shares in VS2010 was re-tweeted by Jarek on his twitter page!
How to create a splash screen in WPF application
Creating a splash screen in WPF and VS2010 is a bit different then previous methods. The simplest way is to add an PNG image of the splash screen you want to use. Add it to your solutions and let the Build Action for it to SplashScreen.
Why PNG vs. BMP ?
The advantage of using a .PNG image over .BMP for your splash screen is that you will have better control on your Splash UI (for example, provide transparency if combined with UpdateLayeredWindow() API [which is not used in this sample]) and also will reduce the overall size of your app. Therefore, it will improve performance by decreasing the cold start and application deployment time.
In this sample the PNG version of the app is about 7 times smaller than the BMP one.
loadFromRemoteSources
System.IO.FileLoadException
Could not load file or assembly 'NLog, Version=1.0.0.505, Culture=neutral, PublicKeyToken=5120e14c03d0593c' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
This is a result of the default loadFromRemoteSources behavior of VS2010. This directive specifies whether assemblies from remote sources should be granted full trust.
In the .NET Framework version 3.5 and earlier versions, if you loaded an assembly from a remote location, the assembly would run partially trusted with a grant set that depended on the zone in which it was loaded. For example, if you loaded an assembly from a Web site, it was loaded into the Internet zone and granted the Internet permission set. In other words, it executed in an Internet sandbox. If you try to run that assembly in the .NET Framework version 4, an exception is thrown; you must either explicitly create a sandbox for the assembly, or run it in full trust.
The <loadFromRemoteSources> element lets you specify that the assemblies that run partially trusted in earlier versions of the .NET Framework should be run fully trusted in the .NET Framework 4.
Adding the following to your app.config and C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config will resolve the issue;
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
Wednesday, May 05, 2010
How to trap Nlog events within your application
Being able to trap nLog log events within your application allows you to provide a default msg to your users without having to have the UI code everywhere in your application.
This post describes how to setup nLog with an additional target that will fire an event in your application that you can then capture.
First there are a few changes to the log file;
Notice that we added a new target and rule for that target. Next we need to add a class with a shared method to capture the event;
This allows you to catch the log event.
Tuesday, May 04, 2010
Busy
I have not posted very much the last few days because I have been working on several priority projects.
Media Repository System, Major update to our Jail Management System, upgraded to VS2010, upgrade our source control system, build an export system for our JMS, started a service controller application to handle difference process snap-ins, a face finding assembly to control pan-tilt-zoom cameras for taking booking photos, updates to our mobile system, deployed our mobile system to a customer, deployed our JMS to two customers, over seeing a Fire House Export module from our CAD system, generated several reporting services reports, and starting back on our new Records Management System. And that was just the last week!
The good news is that I am starting to use VS2010 and the .Net 4 framework for server side applications and have had not issues running side-by-side with VS2008!
Thursday, April 29, 2010
Your Visual Studio 2010 Dream Machine
Here is a link to a great post on configuration recommendations for development environments.
http://blogs.msdn.com/bharry/archive/2010/04/29/your-visual-studio-2010-dream-machine.aspx
Tuesday, April 27, 2010
Silverlight Spy
Silverlight Spy provides detailed runtime inspection of any Silverlight application. Use the built-in browser to navigate to a web page.
Silverlight Spy automatically detects the applications embedded in the page and provides various inspection view panes. Explore the XAP package, Isolated Storage, monitor performance, browse the UI visual and logical tree, examine objects, execute code in the DLR shell and more.
Friday, April 23, 2010
VS2010 Generate From Usage Feature
The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code. This minimizes interruption to your workflow.
Generate From Usage supports programming styles such as test-first development.
Using Generate From Usage in Visual Basic
A wavy underline appears under each undefined identifier, and a short underline appears under the rightmost character. When you rest the mouse pointer on the identifier, an error message appears in a tooltip.
To display the appropriate options, you can use one of the following procedures:
-
Rest the mouse pointer on the undefined identifier. A smart tag (an icon) appears. Click the smart tag.
-
Click the undefined identifier, and then press CTRL+. (period).
-
In the Error List window, double-click the corresponding error row.
The options that appear can include the following:
-
Generate property stub
-
Generate field stub
-
Generate method stub
-
Generate class
-
Generate interface
-
Generate new type (for a Class, Structure, Interface, Enum, Delegate, or Module)
The link below details using this feature.
Silverlight 4 Overview Document
This is a link to a great document covering the technical features of the Silverlight 4.
http://ecn.channel9.msdn.com/o9/learn/Silverlight4/Labs/Overview/WhatsNewInSilverlight4.xps
.NET Framework 4 Client Profile - Introduction
Microsoft has introduced client profile versions of the Net Framework (started in 3.5) which can cause some confusion for users. Below is a great post on what is new with client profiles.
http://blogs.msdn.com/jgoldb/archive/2009/05/27/net-framework-4-client-profile-introduction.aspx

