I get the following error when I try to use Run Custom Tool
or Debug T4 Template
from TypeLite.Net4.tt
ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
If I then try to build the project after I get this error:
Could not copy "obj\Debug\Shared.Web.dll" to "bin\Debug\Shared.Web.dll". Exceeded retry count of 10. Failed. The file is locked by: "T4VSHostProcess.exe (9848)"
TypeLite has worked before but for some reason it has stopped working now. TypeLite is generating files from two projects, Models
is a referenced project to Shared.Web
. Both these DLLs are present in bin\Debug\
.
I read an answer here on SO about retrieving the LoaderException and getting more information but I don't know how to do this for T4.