At my current project we made a project template for Visual Studio for our testers. We added all the references, folders and files a tester needs to add a new system tests project. One of the testers (!) extended our XML generator, which generated XML testcases based on data entered in Excel, to now generate a complete C# test class. Making (system) tests which are automatically run during the nightly build now really is just as simple as entering data in Excel.

In the project template, we added a default namespace followed by $safeprojectname$ in the RootNamespace tag and in the AssemblyName tag. For example, the RootNamespace and the AssemlyName tag contain the following: Namespace.SubNamespace.$safeprojectname$. When you create a project based on the template, named TestProject, the default namespace is filled in accordingly: Namespace.SubNamespace.TestProject. The AssemblyName however, only contains TestProject.

Maybe I’m missing a step where the (entire) AssemblyName is overwritten with the $safeprojectname$ value, but if it is, why isn’t that happening to the RootNamespace tag? These two fields look the same, but act differently. Today I didn’t have any time to discover why this happens, but I’m going to look for the reason. And if I find anything, I’ll let you know.

By the way, I’ll be checking this in Visual Studio 2008 asap.

Edit 21-11-2007 @ 18:07
The MSDN forums have done their job and brought me an answer about this issue and Visual Studio 2005. There is a workaround (see link in the MSDN forums post, or click here). Unfortunately, that involved developing a Guidance Package, which we don’t have time for at the moment. We already instructed our testers to copy the default namespace, and paste it as the assemblyname. That’s [wikipedia:pragmatism] for you 😉

Technorati tags: ,