VSTS Tip: watch your language when creating unit tests


Nutshell: In the dialog to generate your unit tests pay close attention to the default language it is going to create the test project in to make sure it is what you are expecting.

Monstrosity of verbosity: When creating unit tests (right click on the method you want the unit test for, select Create Unit Tests...) there is also an option to create a test project for you.  In the dialog that follows, there will be an option where you can select what language you want the test project containing the unit tests to be in.   It defaults to the language of the profile you selected when first starting VS (C# developer, VB developer, etc).  If you are creating unit tests against a C# project and you really want the tests to be in C#, but you chose General Profile or something, pay close attention and change the target language in that dialog.  Otherwise it may end up creating a test project in VB instead.  Then you'd have to clean up, go back, try again.  <tongue in="cheek">This is not a subliminal conspiracy to get you to become a VB programmer and brainwash you out of using semicolons and being so case sensitive.  Come on, I would never dim you like that.</tongue>

Comments (1)

  1. Yeah, I’m behind, so some of these are old.

    Ian Hu – Profiler Improvements In July CTP of VSTS

Skip to main content