Archive for January, 2011

TFS – Get Compare Results

January 25, 2011 Leave a comment

I need to export the Folder compare results to a text file. Command used for this is “tf folderdiff

Note: This command comes with VS2008, you can’t found in VS2005.
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>tf folderdiff /?
TF – Team Foundation Version Control Tool
Copyright (c) Microsoft Corporation.  All rights reserved.

Displays a visual representation of the differences between files in two server
folders, in a server folder and a local folder, or in two local folders.

tf folderdiff [sourcePath] targetPath [/recursive] [/noprompt]
              [/server:serverName:port] [/filter:filter]

tf folderdiff $/Project/MyApplication/Branch1/database $/Project/MyApplication/Branch2/database /login:myDomain\userName,myPassword /s:http://myTfsServer::8080 /view:different,sourceOnly,targetOnly /noprompt  /recursive > c:\result.txt

Very useful command.

Categories: Uncategorized

How to Test Emails during the Development?

January 25, 2011 Leave a comment

It is very common need to test whether Emails are going to recipients or not, during our development. But your development environment may not support to send the emails.
Below are  the few such environments.
Note: Here I am considering the developing .NET application, either WinForms, or WebForms.

  1. Using Windows XP system for developement.
  2. You don’t have IIS.
  3. You have IIS, but without SMTP server configuration.
  4. In case of ASP.NET web application, you are using ASP.NET Development Server (Cassini)

In such cases, the best workaround to test emails is – Configure an 3rd party SMTP server.
Coming to the point of interest for this post…that is SMTP4Dev ( It is a dummy SMTP server, sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.

How to use it?

Step#1: Download and install it. You will find it in the system tray

And below is its interface

Step#2: Configure (Domain name, IP, Port) and start listening

Step#3: Now, your SMTP server is ready. Before testing this, add configuration setting to web.config file.
        <network host=”localhost” port=”31” defaultCredentials=”true” enableSsl=”false”  />

Step#4: Below is the code snippet to test it.

SmtpClient mailClient = new SmtpClient();
MailMessage msg = default(MailMessage);
msg = new MailMessage();
msg.From = new MailAddress(“”);
msg.Subject = “TEST Subject”;
msg.Body = “TEST Message”;
msg.IsBodyHtml = true;

Step#5: Once it done, you will have the mail in SMTP4Dev window, as shown below…

Step#6: In this dialog, “Inspect”, “View” are useful commands.
Inspect, will shows you the inner details of the email (like… source, headers, body… )

And you can “View” the mail in Outlook client / Windows Live mail client.

We are done with Email testing during the development it self. Very useful and hope the same for you.
Also, there is one more alternative to test emails using deliveryMethod=”SpecifiedPickupDirectory”. Refer the below links…

– Pradeep.

Categories: Uncategorized