This project has moved. For the latest updates, please go here.
1

Closed

LoadWithPartialName is deprecated

description

v.4.7.2:

Row #1250
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
should be
Add-Type -AssemblyName System.Windows.Forms | Out-Null
Row #1266:
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
should be
Add-Type -AssemblyName System.Windows.Forms | Out-Null
Add-Type -AssemblyName System.Drawing | Out-Null
Row #1280:
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
should be
Add-Type -AssemblyName System.Windows.Forms | Out-Null
Add-Type -AssemblyName System.Drawing | Out-Null
Row #5593:
[void][reflection.assembly]::LoadWithPartialName("System.DirectoryServices.AccountManagement")
should be
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
Row #12987:
[void][Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices.Protocols")
should be
$null = Add-Type -AssemblyName System.DirectoryServices.Protocols
Closed Feb 7 at 6:51 PM by robing

comments