When you install VS (or rather the .NET Redist), you get a C# compiler (csc.exe + cscomp.dll), which comes with a csc.rsp. Gus blogs about how it affects how you build.
However, this response file ony affects command line builds, not building with the VS IDE. When you build with a VS project, you only get the assemblies you reference explicitly.
When you create a new C# project in VS, you only get a few DLLs referenced by default. mscorlib.dll and System.dll, of course. Sometimes System.Data.dll or System.Windows.Forms.dll. Sometimes others.
There are two kinds of problems users have as a result of this behavior:
- Compiling from the command line (with csc.exe) and from within the IDE have different default behaviors. (Different referenced assemblies)
- Sometimes you know the name of the type you want, but you have to first add the reference and then add the ‘using’ directive, before the type appears in your completion list.
I’ve proposed that we make the default reference list match exactly the default the compiler command line, as a way to help with both of these problems. The references list would be the same by default.
Most of the types you’re looking for will already be referenced. With the Unbound Type Smart Tag, it’s easy to get the ‘using’ right. They go well together.
There are still some gotchas:
- If you edit csc.rsp, they will no longer match.
- Having this many references may have a small performance impact. We’re still exploring this, and maybe we’ll be able to optimize it away before we ship Whidbey.
What do you think? Is expanding the default references list for VS projects the right way to go?