I'm currently writing a library in C# and was using PowerShell to quickly test it on some occasions. However, this prevents me from re-building the project as PowerShell obviously still has the DLL open.
Is there a way of unloading the DLL again after adding it with Add-Type
? The documentation doesn't seem to have clues on that and the obvious candidate would be Remove-Type
(which doesn't exist – there is only one command anyway with Type
as its noun). It gets cumbersome to close PowerShell and do all the stuff of navigating to the build directory and adding the type again each time I want to rebuild.
$Profile
that runs the script I'm testing, especailly in cases like @Rostellum points out. Using MS Terminal nowadays makes it easy to open/close tabs. Occasionally I'll skip the alias entirely and just make my$Profile
execute the test script so that it runs as soon as a new tab is opened. – Crosier