TeamCity – Change server data directory

If you want to change the <data_directory> path after installing TeamCity 6.5 on Windows, all you need to do is change the teamcity.data.path JVM property. On the default Tomcat server:

  1. Open a command prompt
  2. Execute C:\TeamCity\Bin\Tomcat6w.exe //ES//TeamCity
  3. In the configuration window that come up, change the teamcity.data.path property on the Java tab in the Java Option section to your desired location
  4. Save and Close
  5. Shutdown the TeamCity service(s)
  6. Move all the files that exist in the old datadir location to the new one
  7. Restart the TeamCity service(s)

When the server comes back up, all your existing artifacts should be available and new builds will use the new path.

It looks as if there is now an Environment variable in v7.1+ that can be set instead.

Some more documentation available here http://confluence.jetbrains.net/display/TCD7/TeamCity+Data+Directory

Visual Studio 2010 – Failing project reference

I just ran into a bug with project references not being found in Visual Studio 2010 if the paths of the source and referenced projects are a certain length.

Visual Studio 2010 fails to build the project when the following occurs:

  1. The sum of the following two items exactly 259 characters
    1. The referencing project’s directory path
    2. The relative path to a referenced project from the directory in A

This appears to be due to a bug in Path.GetFullPath in the .NET Framework. More information can be found at http://support.microsoft.com/kb/2516078