开发者

How to get Powershell-ISE to release Cmdlet DLL

开发者 https://www.devze.com 2023-01-18 06:34 出处:网络
I\'m development a Cmdlet and using Powershell-ISE to test.ISE is keeping my DLL locked and preventing from rebuilding and then r开发者_如何学JAVAeloading.

I'm development a Cmdlet and using Powershell-ISE to test. ISE is keeping my DLL locked and preventing from rebuilding and then r开发者_如何学JAVAeloading.

I've tried call remove ps-snappin, but the DLL remains locked.


As Roman points out, this can't be done AFAICT. It isn't a PowerShell ISE issue as much as it is a .NET issue with assembly loading i.e. .NET doesn't support assembly unloading. It would be nice if there was a way to add the snapin via a secondary AppDomain and then unload that whole AppDomain. I'm not aware of any such attempt to do this in a host.


Keith and Roman are correct. Once you've loaded a .NET assembly into an AppDomain, the only way to release it is to close the AppDomain.

0

精彩评论

暂无评论...
验证码 换一张
取 消