【发布时间】:2012-09-28 10:29:37
【问题描述】:
在从 Windows 7 升级之前尝试运行托管的 powershell 脚本时出现以下错误,我从未收到此错误。
加载扩展类型数据时出现以下错误 文件: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 类型的参数。
我在 App.config 中应用了以下内容:
<dependentAssembly>
<assemblyIdentity name="System.Management.Automation" publicKeyToken="31bf3856ad364e35" />
<publisherPolicy apply="no" />
</dependentAssembly>
可能是什么问题?
【问题讨论】:
标签: .net powershell