I moved from a computer to another one, I have the same version of Powershell installed but when it worked on my previous computer, on the new one I have this error when I launch a PS script:
In French :
New-Object : Le type [System.Windows.Forms.DataVisualization.Charting.Chart] est introuvable : vérifiez que l'assembly dans lequel il se trouve est chargé.
In English :
New-Object : The type [ System.Windows.Forms.DataVisualization.Charting.Chart ] not found : Ensure that the assembly in which it is loaded. (translation)
EDIT: .NET Versions
-PSChildName Version ----------- -------
v2.0.50727 2.0.50727.5420
v3.0 3.0.30729.5420 Windows Communication Foundation 3.0.4506.5420 Windows Presentation Foundation 3.0.6920.5011
v3.5 3.5.30729.5420
Client 4.0.30319
Full 4.0.30319
$PSVersionTable Name Value ---- ----- CLRVersion 2.0.50727.5485 BuildVersion 6.1.7601.17514 PSVersion 2.0 WSManStackVersion 2.0 PSCompatibleVersions {1.0, 2.0} SerializationVersion 1.1.0.1 PSRemotingProtocolVersion 2.1
EDIT:
This is the requsted result :
-PSChildName Version ----------- ------- v2.0.50727 2.0.50727.5420 v3.0 3.0.30729.5420 Windows Communication Foundation 3.0.4506.5420 Windows Presentation Foundation 3.0.6920.5011 v3.5 3.5.30729.5420 Client 4.0.30319 Full 4.0.30319