Effective Techniques and Tools for Reducing Leaks in .NET (C#)

But .NET does not allow you to leak??? It’s got garbage collection and what not. L Sadly, there simply is no mechanism that will give you the flexibility you need, allow you to interoperate with existing legacy code, and allocate and de-allocate handles, memory, and other resources at will without paying a tax. Since I…


Splitting Large Solutions

Note: I am a Microsoft Employee, but my views are my own. (*whew* got that off my chest, and satisfied internal requirements) If you have a large solution, you may find that yourself wanting to split your solution into several parts. If your projects are not inter-connected, this works fine. Basically, you just move the…


Rules for Riding

DISCLAIMER: Use these rules at your own risk, or don’t use them at all. I make no statement of their suitability to your riding style. I certainly take no liability for your using them. And, even following them does not guarantee you want have an accident. And, not having the feedback loop involved with talking…


Batching Resources in MSBuild – Part 1

Sometime after Visual Studio 2010 shipped, we received reports about an issue where when targeting .NET 3.5, customers were receiving a build error stating that the RESGEN command line was too long. The errors/warnings would look as follows: Error:The specified task executable “ResGen.exe” could not be run. The filename or extension is too long Warning:The…


Shameless Plug

I work in Redmond on what used to be called the Visual Studio Platform (VSP) during the development of Visual Studio 2010. We are referred to as the platform, as we provide the common set of APIs and services inside Visual Studio that allow other developers to create great editors, designers, language experiences, etc. that…


You Can’t Always Get What You Want, You Get What You Need

I get a lot of feedback from customers on Assembly Resolution. It normally comes in the form of “I can’t get the reference I want in my project”. And more often than not, I find that what they want is really not what they want at all. Instead, a myriad of confusion and lore have…


Not the whole solution

A common misconception I hear a lot is that MSBuild knows how to build Visual Studio solutions. Technically this is not true, while in earnest it is true. MSBuild understands enough about solution files to translate them into MSBuild project files. When MSBuild is launch, it checks the extension of the project it has been…