How to refresh the referenced assembly cache?  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

How to refresh the referenced assembly cache?

Postby orad » 20 Jan 2015

Hi,

When modifying a referenced assembly, recompiling does not reload the assembly until I close MC.NET and open PLEditor.NET again. A similar question about this problem is posted here: viewtopic.php?t=24190

Is there any easier way to refresh the referenced assemblies without having to kill the MC.NET process?

Thanks!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: How to refresh the referenced assembly cache?  [SOLVED]

Postby Henry MultiСharts » 22 Jan 2015

Hello orad,

There is no easier way for that. Please refer to the reply posted by Dru in the topic you have specified.

User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Re: How to refresh the referenced assembly cache?

Postby orad » 22 Jan 2015

Hi Henry,

Thanks for the reply. When investigating this I found out that .NET Framework 4 has something for this called Collectible Assemblies. It's something that has to be implemented at StudyServer level.
Collectible assemblies are dynamic assemblies that can be unloaded without unloading the application domain in which they were created. All managed and unmanaged memory used by a collectible assembly and the types it contains can be reclaimed. Information such as the assembly name is removed from internal tables.
Also if at a future point MultiCharts.NET upgrades to use the new .NET compiler engine (Roslyn), that may provide features to get around this problem.

Thanks,
orad
Last edited by orad on 13 Nov 2015, edited 2 times in total.

User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Re: How to refresh the referenced assembly cache?

Postby orad » 23 Jan 2015

Speaking of the internals of StudyServer, the MC.NET development team may also find this useful:

Project-less scripted C# with ScriptCS and Roslyn

User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Re: How to refresh the referenced assembly cache?

Postby orad » 13 Nov 2015

Opened new issue for this: MC-1969


Return to “MultiCharts .NET”