I am trying to develop a C# class in Visual Studio and test it in Matlab. I can load the NET assembly and use it okay, but a problem arises if I change the NET code.
If I load the NET assembly into Matlab from the Visual Studio debug folder I can't rebuild the assembly in Visual Studio.
If I copy the dll into a local folder and load into Matlab from there I can only load once. Subsequent times I get the following error: "The process cannot access the file because it is being used by another process." In other words it won't let me copy the new dll because the old one is still in use.
So at the moment if I change the assembly code I have to close Matlab and reopen it to test the new assembly. This is adding quite a lot of time to my development.
I believe my version of Matlab (2010a) cannot unload NET assemblies. Does anyone know of another way around this?