Rational Dev

Rational Dev: The Never Ending Pursuit of Software Perfection

The creators of Rational Dev write software programs every day and decided that writing down ideas as we came across them might save us some pain and time in the future. This is a collection of ideas from reading internet articles, books, commerical experience and attempted rational thinking. Hopefully you will join us and provide your own feedback on the ideas presented here.

Posted On: July 5, 2004 - 8:08pm by Rational

List of .NET Exceptions and their Uses

A list of classes that derive from System.SystemException in the .NET framework. Has brief explanations of that they should be used for.

This larger list is everything derived from System.Exception.

Posted On: May 11, 2010 - 3:39am by Rational
( categories: )

There were errors trying to contact Team Foundation Server http://ServerName:8080/

If you get the following error with the Build Notification System Tray program from the Team Foundation Server Power Tools:

"There were errors trying to contact Team Foundation Server http://ServerName:8080/ Object reference not set to an instance of an object."

You probably need to install the latest verison. The most recent version I could find is

Posted On: April 19, 2010 - 3:38am by Rational
( categories: )

Changing Diff and Merge Configuration in Team Foundation Server

If you prefer your own Diff/Merge tool over the standard TFS one, here is how to change the TFS configuration. Personally I use DiffMerge by SourceGear.

Note, you can specify .* for the file type extension to use your merge tool for everything.

Associating a diff tool with a file type in TFS

Common Command and Argument Values for different Diff tools for TFS

Posted On: March 9, 2010 - 2:35am by Rational
( categories: )

MySQL Dump Incorrect Format Bug

I had some fun trying to import:


-- MySQL dump 8.23
--
-- Host: blah Database: blah
---------------------------------------------------------

Which was giving me the strange error, "DROP TABLE IF EXIS' at line"

Turns out you need a space after a comment, so to fix it will be as follows:


-- MySQL dump 8.23
--
-- Host: blah Database: blah
-- -------------------------------------------------------

Posted On: August 30, 2009 - 3:45pm by Rational
( categories: )

Test View Not Displaying All Unit Tests in Visual Studio 2008

For a Visual Studio project to display tests in the Test View window it needs to be created as a "Test" project. If you want to see the tests and it was created as some other kind of project originally, you should be able to add the following in the element in you
.csproj file which is XML based:


<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Now Visual Studio 2008 should display all your unit tests in the Test View window.

Thanks to this article for helping me out with this one.

Posted On: May 29, 2009 - 4:37am by Rational
( categories: )

C#: Constant String From a Constant Char

Have you ever wanted to use a char as a constant string and tried something similar to below, but can't because const string must be valid at compile time?

const string AcceptCommand = Keys.Enter.ToString();

The closest I have found on how to do this is:

private static readonly AcceptCommand = Keys.Enter.ToString();

Posted On: May 19, 2009 - 1:17pm by Rational
( categories: )

C# Snippet Compiler

Not only does LINQPad let you do lots of nifty things with LINQ, it also has C# and VB.NET scratchpad facilities all for the low price of nothing (an Intellisense licence for LINQPad is available for a small cost).

Silver have a nifty C# snippet compiler. There are .NET 3.5, .NET 2.0 and .NET 1.1 versions. Handy for those times when you want to compile and test something quickly.

Posted On: May 17, 2009 - 2:56pm by Rational
( categories: )

Useful Visual Studio C# Command Key Bindings

This is a nifty poster with the Visual Studio key bindings. It is a good idea to take the time to learn these as it will save you time in the long run.

Microsoft Visual C# Default Keybindings

Posted On: April 15, 2009 - 1:56am by Rational

log4net Custom Logging Level

Do you want to extend the ILog interface to include your own custom logging level?

There is an example of how to do this in the examples that come with log4net. The example creates a Trace level. See examples\net\1.0\Extensibility\TraceLogApp.

Posted On: March 19, 2009 - 9:48am by Rational
( categories: )

User login

Google

Navigation