I am having a similar problem, but with a windows forms application I am building. When compiling, I receive the following build error:
InternalMyTemplate.vb(line#): error BC0002: Type System.CodeDom.Compiler.GeneratedCodeAttribute' is not defined.
The system namespace is referenced correctly, but in the object browser the GeneratedCodeAttribute namespace does not exist within System.CodeDom.Compiler.
To clarify, I get this error three times on three different lines of the InternalMyTemplate.vb. Each has the same error with the only difference being the line#.
Multiple times now I have uninstalled (using the uninstall utility) visual studio team system 2005 beta 2, its assorted add-ons, and the .net framework (version 1.1 and 2). I now have visual studio and version 2 of the framework installed, no add-ons, default installs, as simple and as streamlined as I could make it. Still, I get the error.
I posted about this issue recently
here.