I've got a T4 template which references another project and does some reflection on its output assembly to generate some code.
This works fine using Visual Studio 2010 SP1 at design-time, as the assembly is shadow copied before being used.
However when I try to use the MSBuild tasks from the Visual Studio Modeling SDK to do build-time integration, the referenced assembly is locked the first time this happens, and I cannot rebuild the referenced project afterwards.
I'm assuming that this is because the transformation engine is a totally different host under MSBuild, and doesn't include the shadow-copying fix that that Visual Studio host does.
Can anyone confirm if this is a known issue and if there is any workaround?