Visual Studio: How to include missing namespaces

Some of my readers have problem with detecting correct namespaces to include in code samples. Here is how to get references in place using Visual Studio IDE. You can let Visual Studio to solve references to types that have no namespaces for them included in code file. Move cursor to unreferenced type, right click on it with mouse, select Resolve and then select correct type.

Click on image below to see how I resolve Math type.

Visual Studio: Resolve reference

Those of you who have Resharper can use more powerful type resolving, of course.


Leave a Reply

Your email address will not be published. Required fields are marked *