I don't want Entity Framework code counted in code coverage. 29 September 2011 Donovan-Brown Work (0) Problem: The code generated by the Entity Framework is distorting my code coverage numbers. Solution: Add a Code Generation Item and add the [DebuggerNonUserCode] attribute to the generated classes. Explanation: As I described in a previous post here the [DebuggerNonUserCode] hides the code ... [More]
How to create a custom Value Provider for MVC 23 September 2011 Donovan-Brown Work (0) Problem: I need to test an MVC Controller Action that needs the Identity of the current user without mocking the HTTPContext. Solution: Create a custom Value Provider that allows access to the current user via an Action Parameter. Explanation: One of the goals of the MVC pattern is making the a... [More]
Why is my MS Project run so slow when connected to TFS. 19 September 2011 Donovan-Brown Work (0) Problem: With MS Project connected to TFS Project takes forever to refresh. Solution: One possible solution is to change the calculation mode from automatic to manual. To change the calculation mode select Tools / Options / Calculation / Calculation Mode and change from automatic to manual.
Having trouble testing my WPF app with Coded UI Test 17 September 2011 Donovan-Brown Work (0) Problem: I cannot find my WPF TextBlock using the Coded UI test because the value is data bound and changes. Solution: Set the Name attribute on the controls of your View which sets the AutomationId. Explanation: Many WPF developers only place the Name attribute on items they intend to access f... [More]
I can't generate MySQL DDL from my Entity Framework edmx file. 13 September 2011 Donovan-Brown Work (0) Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"... [More]
I need to show TFS history of a file on the command line so I can redirect to a text file. 13 September 2011 Donovan-Brown Work (0) Problem: When I run the tf history command from the command line it shows a dialog box. Solution: Add the /noprompt option to the TF History command. This will cause the output to be shown in the command window. You can then use DOS redirection to easily store the results in a text file. For exa... [More]
I have code I don't want used to calculate code coverage or code metrics 02 September 2011 Donovan Work (0) Problem: I have code that I don't want to be calculated in my code coverage results and/or my code metrics. Solution: Apply the GeneratedCodeAttribute, DebuggerNonUserCode or DebuggerHidden attributes to the specific code. Explanation: Genera... [More]