Monday, June 30, 2008

Multiple Visual Studio Development Server / ASP.NET Development Server

Have you upgraded to Visual studio 2008?
If so, you might have meet the following problem:

  • You have a solution with more than one ASP.NET Web Application project.
  • At least one of those web projects is configured to Use Visual Studio Development Server.

Now, you try to debug one of those web projects. Only one.

you do this by one of those two options:

  • right click the project --> click debug --> start new instance
  • If your web application already runs (usually on IIS settings) --> attach to process.

Now comes the surprise:

image
Instead of getting one Developer Server icon on the taskbar, you get multiple instances!
(one for each web project configured to work with the Development server)

Now, this is not necessarily a bad behavior, as it doesn't actually start all your web projects (which might finish with a lot CPU and Memory load). It is just open a port for those applications. The first time you request a page is the first time the application loaded.

However - it is not the behavior most of us want.

 

The Solution:

I guess Microsoft's developers couldn't hide this setting in a better place...

  1. Stand on the web project (on the solution explorer)
  2. From the menu bar --> View --> Properties Window
  3. on the "Always start when debugging" change the value to False.

image

If you work in a team with source control you'll probably want this setting checked in for all users to get them... but it won't work, as this setting kept on the local .csproj.user file.

It's funny (or it would be if it wasn't sad) that also it is kept in the .user file, it still will ask you to check out the file.

To get over this check out problem, you'll need to uncheck the "Apply server settings to all users (store in project file)" setting on the web tab, in the project properties page, and check in the project.

Hope it will help someone...

Thursday, June 19, 2008

Building a Specific Version with Team Build 2008

You need to rebuild your code as it was at a specific point in history (by a label or a changeset)?

With TFS 2005 you would have needed to change the core implementation of Team Build.
See Aaron Hallberg's "Building a Specific Version with Team Build" blog.

But with TFS 2008 Microsoft already put this logic in, and even gave a GUI to use it:

Go to Team Explorer 2008 --> Builds.
Right click the Build definition you want to build.

click Queue New Build.

image

On the pop up window in MSBuild command-line arguments (optional) write:

/p:GetVersion=version

image

Where version is the Versionspec by the following syntax:

image

Hope it will help someone.

Friday, June 06, 2008

Insane vs. Sane

Today the only difference between a sane and an insane man is a blue light...

 

of the Bluetooth headset in his ear.

Both are speaking loudly in the street without anyone beside them.


if it is lightening - he is normal.
if it is turned off - he is insane.

What a world.