views:

33

answers:

1

I'm just getting started with Visual Studio (2010 Beta) and have some basic questions that I'm sure have easy answers:

  1. When looking at sample code I often have a hard time finding the right things to add references to. For instance, a sample program opens System.ServiceModel.Web but I can't find the required reference. Web doesn't exist in System.ServiceModel reference. More generally, there doesn't seem to be a one-to-one match between namespaces that I see in code and the references to dlls I need add. The add references dialog has no search functionality so I find myself scrolling around trying to find the right dll. Is the a better way? Specifically, where's System.ServiceModel.Web?

  2. Since I'm experimenting a lot, I often have many files that have all sorts of compile errors floating around. When a try to build my project things explode with errors I'm not interested in. Is there any way to build just one file in a project? Even errors in F# script files give me compile errors when I compile a project, even though they are just experimental notes.

  3. Is there a way to "Debug" and run just one project in a solution, not the entire solution? When I click debug, all these random projects start that I'm not interested in at the moment.

+1  A: 

1) Use the object browser functionality - View->Other Windows->Object Browser - you can do a search here and then by clicking on the top-level item in the tree there is a pane that shows the path to the DLL.

This shows that on my machine ServiceModel.Web is in C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.ServiceModel.Web.dll

2) You can exclude files from being built by changing the Build Action property for them to "None"

3) Similarly you can "Unload" projects from a solution (and then reload them later) by right clicking on them and selecting unload

Matt Breckon
I don't see Unload, do you mean Remove?
Tristan
No - I mean unload but I must admit that I use it on VS2008 at work. On my VS Express edition at home I can't seem to find the menu item - which version of VS are you using?
Matt Breckon
2010 Professional Beta 2
Tristan
ServiceModel.Web seems to be from the REST Starter Kit: http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
Tristan