Must close MultiCharts to recompile referenced assembly

Questions about MultiCharts .NET and user contributed studies.
User avatar
PatrickSocal
Posts: 58
Joined: 27 Apr 2013
Location: San Diego, CA
Has thanked: 23 times
Been thanked: 30 times

Must close MultiCharts to recompile referenced assembly

Postby PatrickSocal » 17 Jun 2013

Hi,

I've written some of my strategy logic in an external assembly... let's call it MyLib.dll. I compile this assembly from its own solution, and reference it in the MC.NET solution. Everything works as it should.

However, when I wish to make a change to MyLib.dll, and I attempt to recompile it, I get the following error in Visual Studio:
Error 1 Unable to copy file "obj\Debug\MyLib.dll" to "bin\Debug\MyLib.dll". The process cannot access the file 'bin\Debug\MyLib.dll' because it is being used by another process.
I have found I must close the MultiCharts application, recompile my dll, then restart MultiCharts. This works, but it is slow and inconvenient. Does anyone know of a better way? If not, is this the sort of thing that can be improved in a later version of MultiCharts? (I'm currently using 8.5 build 7009.)

Thanks,

Patrick

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: Must close MultiCharts to recompile referenced assembly

Postby Dru » 18 Jun 2013

There is no way to unload an individual assembly without unloading all of the application domains that contain it. Use the Unload method from AppDomain to unload the application domains. (c)


Return to “MultiCharts .NET”