Visual Studio Blog

The official source of product insight from the Visual Studio Engineering Team

Custom Extension Types with VSIX

DISCLAIMER: While the following technique is supported in Visual Studio 2010, the interfaces and methods exposed by Microsoft.VisualStudio.ExtensionManager.dll are likely to change in future Visual Studio releases. If you create an extension that relies on Microsoft.VisualStudio.ExtensionManager.dll, there is no guarantee that your extension ...

WPF in Visual Studio 2010 – Part 4 : Direct Hosting of WPF content

This is the fourth part in the series of posts on Visual Studio 2010’s use of WPF. This week, we’ll take a look at how Visual Studio 2010 detects and hosts WPF content ‘natively’ while at the same time allowing for non-WPF content. Frames and Panes In the Visual Studio extensibility model, the client area of a window is called a “...

Creating and Sharing Project & Item Templates

One of the great new features we added in Visual Studio 2010 is the ability to easily find and consume online Project and Item templates without leaving the New Project/Item dialog. What may not be so obvious is how to go from a piece of code you want to share to a template contained in a VSIX file that can be uploaded to the Visual Studio ...

WPF in Visual Studio 2010 – Part 2 : Performance tuning

This post, the second in a series of articles on Visual Studio 2010’s use of WPF, covers tips and techniques for optimizing performance of WPF applications, and also several areas where we needed to tune Visual Studio 2010 in order to squeeze the best out of WPF. The first post in the series covered the motivation for selecting WPF and some ...

Marshal.ReleaseComObject Considered Dangerous

This post describes a problem we encountered and solved during the development of Visual Studio 2010 when we rewrote some components in managed code. In this post I’ll describe the problem and what we did to solve it. This is a rather lengthy technical discussion and I apologize in advance for its dryness. It’s not essential to understand ...

MSBuild Task Factories: guest starring Windows Powershell

One of the cool new features of MSBuild 4.0 is the extensible task factory.  Task factories allow you to include scripts directly in your project file (or an imported .targets file) and have those scripts parsed and executed by your favorite interpreter.  Those scripts might even be C# or VB.NET code snippets that get compiled into ...

Covariance and Contravariance FAQ

In this post I’ll try to answer the most common questions I find on forums and in documentation feedback about C# covariance and contravariance. It’s a big topic for a single blog post, so expect to see a lot of “more information” links. Special thanks to Eric Lippert and Chris Burrows for reviewing and providing helpful comments. ...

WPF in Visual Studio 2010 – Part 1 : Introduction

This is the first part in a seven part series. Links to the other parts are included at the bottom of this post. Now that the Release Candidate for Visual Studio 2010 is publicly available, we’ve started receiving questions from inquisitive users about how Visual Studio 2010 itself was built. In particular, one questioner wanted to know ...

What is the difference between “dynamic” and “object” keywords?

Let’s take a quick look at the object keyword first. I’m not going to talk a lot about it because it’s been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object...

How to read/write the new Visual C++ project properties

Visual C++ 2010 introduces several new project and tool properties, and deprecates some old ones.  If you’re writing a project template or Visual Studio extension that needs to programmatically read and write the new properties, you will find that these properties are not available on the standard VCConfiguration, VCCLCompilerTool, etc. set...