Remove unnecessary using directives for WinForms and Drawing in Start-SPMigrationGUI.ps1
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
using assembly System.Windows.Forms
|
||||
using assembly System.Drawing
|
||||
using namespace System.Windows.Forms
|
||||
using namespace System.Drawing
|
||||
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
@@ -784,6 +780,7 @@ class DialogBuilder : BaseComponent {
|
||||
}
|
||||
}
|
||||
|
||||
# PowerShell 7 can fail to resolve WinForms via `using assembly`, but runtime loading works reliably.
|
||||
[void](Add-Type -AssemblyName System.Windows.Forms)
|
||||
[void](Add-Type -AssemblyName System.Drawing)
|
||||
[System.Windows.Forms.Application]::EnableVisualStyles()
|
||||
|
||||
Reference in New Issue
Block a user