Hi, John.
What you describe is caused by how our Cassini determines whether it is running as a service or as an interactive application. When the TFSBuild script is running as a service Cassini thinks it is also running as a service, instead of behaving like a command line utility. We've logged this as a bug and will fix it in the next version of the product.
To work around the problem we can suggest using
Cassini Configuration API, which is a .NET assembly, and is very easy to use. So if TFSBuild allows you to execute .NET code, Cassini Configuration API should be a pretty painless alternative, and is guaranteed to work from under a service. Cassini Configuration assembly is located at "%ProgramFiles%\UltiDev\Cassini Web Server for ASP.NET 2.0\UltiDevCassiniServerConfiguration.dll". Once you have added a reference to it to your project, you can use static version of the
Metabase.RegisterApplication method to register an application, and
Metabase.UnregisterApplication to unregister it. In a worst case scenario, writing a simple console-based program that will use Cassini API to register/unregister an application, should be fairly trivial. That program could be launched by the TFSBuild script.
Please let us know if this information has helped.
Best regards,
UltiDev Team.
Please donate at
http://www.ultidev.com/products/Donate.aspx to help us improve our products.