打开 Nuget 控制台我收到以下错误:
加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(32) : Error in type "System.Xml.XmlNode": 异常: 由于方法格式,无法创建代码方法。该方法应该是公共的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(44) : Error in type "System.Xml.XmlNodeList": 异常: 由于方法格式,无法创建代码方法。该方法应该是公共的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C: \Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(87):类型“System.DirectoryServices.PropertyValueCollection”中的错误:异常:由于方法格式,无法创建代码方法。该方法应该是公共的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(353):“System.DirectoryServices.DirectoryEntry”类型中的错误:异常: 由于方法格式,无法创建代码方法。该方法应该是公共的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(360):类型“System.DirectoryServices.DirectoryEntry”中的错误:异常:由于方法格式,无法创建代码方法。该方法应该是公共的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(372):“System.IO.DirectoryInfo”类型错误:异常: getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(399):“System.IO.FileInfo”类型错误:异常: getter 方法应该是公共的、非 void 的、静态的、并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2977):类型“System.Security.AccessControl.ObjectSecurity”中的错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2984):类型“System.Security.AccessControl.ObjectSecurity”中的错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C: \Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2991):类型“System.Security.AccessControl.ObjectSecurity”中的错误:异常:getter 方法应该是公共的、非 void、静态的,并且有一个参数键入 PSObject。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2998):类型“System.Security.AccessControl.ObjectSecurity”中的错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3005):类型“System.Security.AccessControl.ObjectSecurity”中的错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3219):类型“Microsoft.PowerShell.DeserializingTypeConverter”中的错误:类型“Microsoft.PowerShell.DeserializingTypeConverter”应该是 TypeConverter 或 PSTypeConverter。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3648):类型“System.Management.Automation.ParameterSetMetadata”中的错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。加载扩展类型数据文件时出现以下错误:Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3733):“System.Management.Automation.FormatViewDefinition”类型错误: 例外:getter 方法应该是公共的、非 void 的、静态的,并且有一个 PSObject 类型的参数。处理 'nuget.psm1' 的模块,列在模块清单 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\QIYNP3CN.X43\Modules\NuGet\NuGet 的字段 'ModuleToProcess' 中。 psd1' 没有被处理,因为在任何模块目录中都没有找到有效的模块。
我可以更新一些 nuget 包,但不能更新 Entity Framework 和其他一些包。对于后者,我收到一个错误:
“...未能初始化 PowerShell 主机。如果您的 PowerShell 执行策略设置为 AllSigned,请先打开包管理器控制台以初始化主机。”
我应该补充一下,我有 Windows 8.1 Pro 64 位。