Archive for October, 2010

3 Google Tricks When You Don’t Know What to Search For

3 Google Tricks When You Don’t Know What to Search For.


How to work offline with TFS – Stack Overflow

How to work offline with TFS – Stack Overflow.

Patches you may need that do not come to you actively

Today, after finding two patches that release me from the bugs of Visual Studio 2010, I decided to note them down here so as others can quickly find them.

  1. Patch Available for Cut or Copy displaying “insufficient memory” error in VS 2010 – The Visual Studio Blog – Site Home – MSDN Blogs
  2. Patch Available for the Growing Find and Replace Dialog
  3. (to be updated)


My Suggestions for Visual Studio 2010

Visual Studio Blog is calling for feedbacks from its users. On this chance, here’s what I need and currently love to have in Visual Studio IDE.


  1. 17 May 2011
    [IDE] When 1) a dialog is poped up, 2) minized all windows, 3) select to restore any window other than the IDE will ALSO open the IDE !?
  2. [C#] The ability to generate code snippet  for local undefined variables – similar to current feature of generation for field/property members.
  3. [C#] Be able to align named parameters and variable assignments – to be configurable when format document.
  4. [C#] has allowed trailing commas at the end of parameter list. Would be more lovely if the language also allow leading commas.
  5. [C#] When viewing Implementation of a method of an interface using Call Hierarchy, if we open the result list while it is still loading, the results will be showed but then, the keyboard input is frozen – we cannot move up/down the heirarchy.
    02 Nov 2010 03:45pm
  6. [C#] Allow named parameters when writing a lambda expression.
    E.g. This code is failed
    someObject.SomeMethod( (arg) => arg.ArgMethod(namedArg:1, namedArg:”22″) );
    While this one is passed

    someObject.SomeMethod( (arg) => arg.ArgMethod(1, “22”) );
    03 Nov 2010 03:00pm
  7. [IDE] Fix “bug” cannot load assembly in UnitTest project. The problem is detailed in here.
    15 Nov 2010 2:00m
  8. [IDE] Bookmarks have order numbers – currently bookmarks are un-numbered, the bookmarks list is sorted in order of line numbers in files. This is helpful when reading codes and need to bookmark the code in my order – NOT in the line number order.11 Nov 2010 23:00pm
  9. [IDE] Support filter box for Error/Warning Message Pane – lovely if be able to display messages which not contains keywords, e.g. “predicated”
  10. [IDE] Would be lovely to have the toolbars replaced by ribbon tabs. I’ve read some articles related to this and it seems hardly to happen but still want to suggest it, dream to have it someday.
  11. [IDE] Support higlighted codes in search results
  12. [IDE] The Solution Explorer doesn’t remember its size when pinned – it should restore the last spinned size
    10 Dec 2010 01:00pm
  13. [IDE] Trim trailing spaces when format document/seletion
    09 Dec 2010 10:00pm
  14. [IDE] Provide a way to open a solution file in leveraged mode (run-as-admin opening a solution file). Currently I can only start the IDE in leveraged mode alone (i.e. without opening any solution)
    07 Nov 2010 07:00pm
  15. TFS open its new views in new tabs, NOT in new modal dialogues.
  16. TFS allow to filter work-item query results.
  17. TFS better support for teams working between distance offices located in different countries.
  18. TFS show suggestion list for associated work-items when checking-in – suggested ones taken from the recent association-history of the pending files (i.e. which items that they have been chosen to coop with previously).
  19. TFS code-comparation tool should show changed-text details within a line – currently it just shows a line is changed and user have to locate which text has changed manually.
  20. [TFS] Show line number when displaying `Annotation` of a file
  21. [TFS] Provide a button to work off-line
  22. [WPF] When viewing the properties, there are options to view them alphabetically/in-categories. It would be nice to have the same things applied to event view.
  23. [WPF] When changing a bound property in code, it should suggest updating in the XAML script (similar feature already exists: changing a handler name in code will have chance to update it automatically by using Ctrol+’.’).
  24. [WPF] Support auto complete when entering a resource key.
  25. [WPF] Support complex conditions for triggers (allowing and/or/not condition combination)
  26. [WPF XAML] Support auto attribute alignment when format document – currently only tags are aligned, attributes of a tag on different rows remain as-is.
  27. [WPF] Allowing to write comment which lies between attributes.
  28. [WPF] Opening a form with dual/design mode takes a while (>1 second) to load – lovely to have this load faster!
    29 Oct 2010 10:00 am
  29. [WPF] Support region tag for XAML script as we do in C# code.
    30 Oct 2010 10:00 am
  30. [WPF] Support Justify alignment for text displaying control.
    01 Nov 2010 5:00 pm
  31. [WPF] Support generate a new resource style from selected properties.
    07 Nov 2010 07:00pm
  32. [WPF] Support displaying a ‘mock’ value for bound properties – only get effected when in design-mode.
    10 Dec 2010 03:00pm
  33. (to be updated)


  1. [IDE] The IDE often have the error “Insufficient memory” and stop me from  executing copy/paste commands.

    Apply official patch here
  2. [TFS] [already support] When there’s a conflict, please allow an option to overwrite all – currently if I have tens of conflicts I have to sit & click the whole things.Solution:
    Just Ctrl-A and select command.
  3. [IDE] Currently love the way the IDE generate method from its usage (call-first style to create a method). But if I put in named arguments, the feature stop working. Please update to allow named arguments if possible.
    Built-in already. The failed situation lies back in the past for weeks. I will return to this when the memory comes back hopefully.

Fixing Error: The Calling Thread Must Be STA, Because Many UI Components Require Thi – C# | Dream.In.Code

The Calling Thread Must Be STA, Because Many UI Components Require Thi – C# | Dream.In.Code.

Layers – Google Chrome extension gallery

Add sticky notes/comments on any web! Cool!

Cooler! You can share and see your friends shared stuffs!

Layers – Google Chrome extension gallery.

How to run unit testing tests from command line?

(Also co-authored on

I googled and found the below helpful references. Currently I want to run all from the command-line (for easy of execution & quickness) in cases:

  1. A specific test (ie. a test written by a method marked [TestMethod()])
  2. All tests in a class
  3. All impacted tests of the current TFS pending change of mine.
  4. All tests
  5. All tests except the ones marked as category [TestCategory(“some-category”)]

I’m not sure how can I write a correct command for my needs above.

If you know know, please share! All helps are welcomed and very much appriciated!


  1. the MSTest.exe
  2. the MSTest.exe’s detailed options
  3. obtaining the result


After a while, I found the below useful tips.

  1. run Visual Studio unit tests by using MSTest.exe, located at %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe in my case.
  2. using /container:Path\To\Your\TestProjectAssembly.dll to indicate where your tests are coded.
  3. using /test:TestFilter to filter the tests to run. Note that this filter is applied to the full test method name (ie. FullNamespace.Classname.MethodName)

Hope this helps you guys.