Tuesday, October 20, 2009

Manual Remove Visual Studio 2005

I have problem to remove the Visual Studio 2005. It complains about the
vs_setup.msi could not be found in c:\program files\microsoft visual studio
8.

I also tried to remove it from DVD, which was not successful as well.

(1) Rename the Visual Studio directories to something else (ie. add REMOVE
to the folder name)

(2) rename the following Register entry using REGEDIT (use with care!)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 (ie. change
\8.0 to \8.0REMOVE)

(3) Download the Windows Install Clean Up utility at:
http://support.microsoft.com/default.aspx/kb/290301

Use this software to 'clean up' anything with Visual Studio in the
name.

(4) Reinstall the Visual Studio software


You must install Windows Installer Cleanup Utility - msizap.exe.
http://support.microsoft.com/default.aspx/kb/290301

Friday, October 09, 2009

Team Build Tray

There are many ways to monitor the team builds status. The greatest one I found is the Team Build Tray, which is pretty similar to the CruiseControl one I have used before. So far this tool is the most satisfied one I have used.
URL: http://teambuildtray.codeplex.com/

There are other tools other there in codeplex. But I just don't see how they will be used in a common development environment.

http://buildmonitor.codeplex.com/

is supporting Twitter and USB build light.

http://tfsalert.codeplex.com/

is not useful and I haven't seen any place to set where the TFS is.

Sunday, September 27, 2009

Conference - Houston TechFest 9/26/2009

The conference was held in University of Houston main campus. It was such a great free conference. Highly recommend it to other tech folks in Greater Houston Area. Below are the sessions I have attended to give some ideas to have the complete list, you can go to the following link.

http://houstontechfest.com/

Session 1: Preparing for Your Organization’s SharePoint Future in SharePoint 2010

by Erin O’Connor

  • Ribbon Styled
  • Visio 2010 Added
  • Silverlight
  • BDC changed to two-way BCS
  • Performance Point to bring BI
  • Firefox, Safari and IE compatible. No support IE 6 anymore
  • Offline workspace support
  • Only support 64 bits server
  • SPaaS

Session 2: Microsoft Dynamics xRM by Daniel Hunter

  • xRM 4.0 demo

Birds of a feather – Staying Alive: Social Media Tips for Techies

Session 3: What’s new in C# 4.0

  • Optional Parameters
  • Named Parameters
  • Dynamics (same as object, however it defer the binding in runtime).

Session 4: VSTS/TFS 2010 (Mike Azocar, and Mike Moles)

  • Best improvement: QA, Architecture, and Gated Check-in
  • Branch Visualization
  • Work Item Tracking
  • Work Item Hierarchy (even working in Excel)
  • Track change set across branches
  • Rolling tests, Test impacted test cases (Unit Tests Improvement)
  • QA: Historical Debugging – No repro
  • QA: Test and Lab Manager
  • Built on WPF
  • Catch a bug earlier will save cost by multiple times
  • Build Controller with WF

Session 5: Best practices on Developing and Customizing Web Parts

  • Recommend using built-in web parts such as DataForm and DataView
  • MVP – Model, View, and Presenter

Final Session: Prize Drawing

  • I won a Resharper license worthy of the market value $199.00.

Friday, September 25, 2009

Interesting Interview Code Question

My colleague sent me an interesting interview code question and it's pretty fun.

using System;

namespace SomeNamespaceName {

class A {

public void DoAStuff( ) { Console.WriteLine( "A::DoAStuff()" ); }

}

class B {

public void DoBStuff( ) { Console.WriteLine( "B::DoBStuff()" ); }

}

class C {

A _innerA = new A();

B _innerB = new B( );

public static implicit operator A (C c ) {

return c._innerA;

}

public static implicit operator B( C c ) {

return c._innerB;

}

public void DoAStuff( ) { ( ( A )this ).DoAStuff( ); }

public void DoBStuff( ) { ( ( B )this ).DoBStuff( ); }

}

class Program {

static void PassA( A a ) { a.DoAStuff( ); }

static void PassB( B b ) { b.DoBStuff( ); }

static void Main( string[ ] args ) {

C c = new C( );

PassA( c );

PassB( c );

c.DoAStuff( );

c.DoBStuff( );

}

}

}

Question:

1) What does the code print out?

A: A::DoAStuff()
B::DoBStuff()
A::DoAStuff()
B::DoBStuff()

2) Why does it work?

Op A: Operator Overloading

3) Why would I write code like this?

Mu A: Multiple Inheritance Workaround

4) Explain how it works?

A: Using operator overloading A and B to achieve the “type casting” A and B (not the same instance).

Upgraded my home PC from Vista to Windows 7

Finally I upgraded my Vista from home premium to ultimate. It took more than 3 hours to finish. The process was smooth. After I hit upgrade button then hands-off. I started the Windows 7 upgrade (in-system) it warned me that Vista will no longer available and a few programs or drivers will be no longer compatible. In deed, after the upgrading, my Visual Studio 2008 can't work and have to reinstall.

The upgrade process were divided into the following stages.
  • Copying files (fast)
  • Gathering files, settings, and programs (slow)
  • Expanding Windows
  • Installing features and updates
  • Transferring files, settings, and programs (slow)
So according to my colleague, the installation process is much faster if you are doing a fresh installation.

I am pretty happy with the speed of the operating system. The time of waiting has been significantly reduced comparing to Vista. Visual Studio seems much faster to launch now. IE works much faster and the frequency of hanging is significantly reduced. The interface is much easier to use.

Wednesday, February 11, 2009

Use Visual Studio 2008 SDK to customize TFS


Recently I got a chance to assist someone in the other project of my client to generate a report from TFS. He needed a report of all the details of the changeset in certain period of time. I managed to write some sample code for him with Visual Studio 2008 SDK 1.1 which provides API to query TFS history and get the change-set details.

The code is in C#. The test was very successful; I could query the history; then I got changeset list; then I used the changesetid to get all the objects (change instances). There are two main methods you can find in the attached solution. –QueryHistory [1] and GetChangeset[2].

[1]: http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver.queryhistory(VS.80).aspx
[2]: http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver.getchangeset(VS.80).aspx

Sample code:

        private static IEnumerable QueryHistory()
{
TeamFoundationServer tfs = new TeamFoundationServer(tfsName);

// Get a reference to Version Control.
VersionControlServer versionControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
string path = @"$/YOUR-TEAM-PROJECT-NAME";
VersionSpec version = VersionSpec.Latest;
int deletionId = 0;
RecursionType recursion = RecursionType.Full;

string user = "YOUR-USER-NAME";
// VersionSpec versionFrom = VersionSpec.ParseSingleSpec("115894", "mahesh_lambe");
//keep it 'null' for first version
VersionSpec versionFrom = null;

// VersionSpec versionTo = VersionSpec.ParseSingleSpec("109014", "mahesh_lambe");
//keep it 'null' for latest version
VersionSpec versionTo = null;

int maxCount = Int32.MaxValue;

bool includeChanges = true;

bool slotMode = true;

bool includeDownloadInfo = true;

IEnumerable enumerable = versionControl.QueryHistory(path, version, deletionId, recursion, user, versionFrom, versionTo, maxCount, includeChanges, slotMode, includeDownloadInfo);

return enumerable;
}


        // Get a reference to our Team Foundation Server.              
private static String tfsName = @"http://YOUR-TFS-SERVER-NAME:8080/";

internal static Changeset GetChangeset(int _changesetNumber)
{
TeamFoundationServer tfs = new TeamFoundationServer(tfsName);

// Get a reference to Version Control.
VersionControlServer versionControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
Changeset ch = versionControl.GetChangeset(_changesetNumber, true, true);

Console.WriteLine(ch.ToString());
return ch;
}

Monday, December 15, 2008

WiX 3.0 Integration with VS 2005 or 2008

Here are some good things about WiX3.0 I found out. The WiX 3.0 is supported on both VS2005 and VS2008. We could setup both VS2005 and VS2008 solution to include WiX 3.0 project, or *.wixproj file. I have VS2005 and VS2008 installed on my local and I can edit the WiX project in either of them.

Cool thing to specify output file in GUI and you don't need to remember candle and light any more. Now it is much either to support pre-build and post-build events like normal .NET projects. If you have noticed that in order to replace the Version in the MSI I actually used the pre-build to replace and used post-build to restore the original file.

Be A Developer That Uses AI

Developers will not be replaced by AI, they'll be replaced by developers that use AI. Generative AI tools are revolutionizing the way de...