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

Citrix and .NET user application settings

If you have found that user (or application) settings are disappearing in your .NET application when you log out of Citrix, you may need to use Roaming profiles to store the settings. This will ensure that settings are persisted across Citrix logins.

This is accomplished with the following attribute in your Settings class:


[UserScopedSettingAttribute()]
[DebuggerNonUserCodeAttribute()]
[DefaultSettingValueAttribute("-1")]
[SettingsManageabilityAttribute(SettingsManageability.Roaming)]
public int DefaultCropId {
get {
   return ((int)(this["DefaultCropId"]));
}
set {
   this["DefaultCropId"] = value;
}
}

Note the SettingsManageability.Roaming option. This causes the user.appSettings file to be created under %AppData%/Roaming/ instead of %AppData%/Local/

Visual Studio – Force Backspace to delete tabs

By default in Visual Studio 2010, the backspace key deletes a single character. I believe this behavior changed in VS 2005 but I keep forgetting how to change it. I know you can hold Ctrl+Backspace to delete the tab, but that to me is just slow and unnecessary. 90% of the time, I want to delete the entire tab when I hit backspace.

To make the backspace key delete an entire tab, go to Tools -> Options…, and expand Text Editor -> All Langauges ->Tabs. In the Tab group select the Keep tabs radio button. You can also do this on a per language basis if you wish.