When rebuild the solution, I got error message:-
Error Unable to copy file "obj\Debug\TargetTest.dll" to "bin\Debug\TargetTest.dll". The process cannot access the file 'bin\Debug\TargetTest.dll' because it is being used by another process.
When I remove the assembly directive, the solution rebuilds:-
<#@ template debug="true" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="C:\\Code\\T4Template\\bin\\Debug\\TargetTest.dll" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.Reflection" #>
<#@ output extension=".cs" #>
How to fix this? I guess it is related to shadow copying configuration in visual studio but I could not locate it.