I've a script file containing a class definition. Using the new V5 Powershell syntax. I've another script file that dot source the class and uses it. I'm testing that file in the console.
On clean startup of the console it will load the class correctly. I then make some changes to the class and saved them back to file. Re-running the script does not appear to pick the changes up. It is as though once loaded into the console, the class is immutable and will not be parsed and reloaded.
This really hurt when developing, since I have to spin up a new console after any change to a class.
Is there a way to force Powershell to reload classes each time it sees them?
This occur in code debugged both in Powershell ISE and in the Powershell console (using vscode).