Force LINQPad to reload DLL
I have a script that creates DLL on the fly, puts it into a local folder, and the rest of the script is using that DLL like this:
//set custom parameters for DLL
//create DLL in local folder
//use that DLL
The script has referenece to this DLL.
I know the way I do it looks weird but I need exactly this.
Script works well and the DLL is successfully created in the local folder but if I change custom parameters at step #1 and re-run, script would still use old DLL because it actually uses the *copy* of the dll located in the LINQPad temp folder. How can I make the script use the latest one? I tried to change assembly version but this didnt help. Thanks.
//set custom parameters for DLL
//create DLL in local folder
//use that DLL
The script has referenece to this DLL.
I know the way I do it looks weird but I need exactly this.
Script works well and the DLL is successfully created in the local folder but if I change custom parameters at step #1 and re-run, script would still use old DLL because it actually uses the *copy* of the dll located in the LINQPad temp folder. How can I make the script use the latest one? I tried to change assembly version but this didnt help. Thanks.
Comments
Util.NewProcess = true;
My script does update the DLL (which is permanently referenced, not dynamically loaded) but on the next run it's still using older version. What is interesting is that newly added classes are showing well in the script, but still getting "Couldn't load type XXX from assembly YYY" error.
This could help me if I knew more about how and at what moments LINQPad checks local dll for updates.