DCSIMG
July 2009 - Posts - Baruch Frei
Sign in | Join | Help

July 2009 - Posts

Windows 7 & Network Loopback Adapter Settings

Published at Jul 09 2009, 12:10 PM by BaruchF

If you are running virtual machine on windows virtual PC and you want to connect

the host to the guest, for example: your virtual machine hosts TFS server and you

want your VS on the host to connect to it. You can use Microsoft loopback adapter to

create virtual network that connects the computers.

Here is great post (A lot of pictures :-)) how to install it on windows 7.

In virtual machine settings choose the loopback as the network adapter.

image

configure the network adapter on the host and on the guest to use virtual IP in the same

range (1.1.1.1 & 1.1.1.2 worked for me). Now they should connect each other.

Pinging from host to guest worked but pinging back from guest to the host returned 

time out. After searching I found the problem is that  Windows 7 declares this network

connection as undefined public network and blocks connections from it, but there is no

way to change it to home or work network because this option is unavailable :-(

image

After spending a lot of time I found this great post that describes the same problem

on vista and a way to solve it: set your loopback adapter connection (host) default

gateway to the IP of the virtual machine then the network will be defined and you can

change it to home or work .

image

Plus another bonus that you can change its name to meaningful name…

Worked for me !

Thanks Lambros.

Debugging Team Build – Now you can !!!

Published at Jul 02 2009, 09:13 AM by BaruchF

In the last post I wrote about the new features in the new coming version of the

TFS 2010. In the next posts I will try to give a closer look on every feature.

TFS 2008 Build script editing

In TFS 2008 the build script was written in xml based on Msbuild scripts.

Which means that editing the script was pretty ugly and annoying method.

This scripts defines the targets and tasks to run in the build but the schema

was never updated to recognize all the new targets and tasks so you didn’t

really got help by the Intellisense. Beside that, when writing custom tasks, there

is no way that the script will recognize your task and help you call it with the

right parameters and syntax.

And the worst thing is that there is no way to debug it on runtime. The

only way to debug it is by inserting custom messages in the log and review it

afterwards. Ugly!

TFS 2010 Build script editing

In TFS 2010 the build script is written in a new modern language: Workflow 4.0.

This means that the language is fully supported and much easy to edit and

maintain as writing any application in Workflow. All steps (aka targets) are known

and recognized by the Intellisense. Every custom activity you write (aka tasks) is

fully recognized - no more guessing for the right syntax.

(BTW Aaron wrote a great post on how to write custom activity.)

And the most exiting thing is that now you can debug it at runtime

Here is how you do it:

  1. open the process template project file

    image

  2. right click where you want in the flow and add break point
  3. click Debug menu –> Attach to process
  4. find the TFSBuildServiceHost and attach to it

    image

    (don’t forget to mark the show process from all user in all sessions)

  5. run the build and wait for the break point to be hit
  6. now you can debug it as any application

image

image

Enjoy !