how to export a class in powershell v5 module

后端 未结 10 705
不思量自难忘°
不思量自难忘° 2020-12-08 14:53

I\'ve got a module setup to be like a library for a few other scripts. I can\'t figure out how to get a class declaration into the script scope calling Import-Module

10条回答
  •  盖世英雄少女心
    2020-12-08 15:01

    To update class definitions while developing select the code for the class and press F8 to run the selected code. Not as clean as the -Force option on the Import-Module command. Seeing as Using Module doesn't have that option and Remove-Module is sporadic at best, this is the best way I have found to develop a class and see the results without having to close down the ISE and start it up again.

提交回复
热议问题