This project is read-only.

How to unload Flit.dll for recompilation

Jun 4, 2010 at 9:15 AM
Edited Jun 4, 2010 at 9:16 AM

As you go and adapt Flit to your needs, recompiling and retesting just like that won't work because Visual Studio keeps a reference to the dll starting from the point where you click "Transform All Templates" for the first time. The compiler error says:

error MSB3021: Unable to copy file "obj\Debug\Flit.dll" to "bin\Debug\Flit.dll". 
The process cannot access the file 'bin\Debug\Flit.dll' because it is being used by another process

Currently, this forces me to close and relaunch Visual Studio each time I want to try out a change. Do you have cleverer solution to this problem? Is there a way to tell Visual Studio to unload the Flit.dll?


Jun 4, 2010 at 10:45 AM

This is quite a common problem with T4 (at least, with T4 development). There's a few ideas you can try at, but i got by with just not rerunning my templates very often during development (Unit tests helped a lot with this).

You can just close & reopen the solution rather than visual studio if you like

Regards - Rob