- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我几个月前在我的系统上安装了新的 PowerShell 版本。从那以后,每次我使用 shell 时都会发生一些奇怪的事情。它不会影响功能,但它让我感到困扰和困扰,因为每次在命令执行结束时我都必须看到红色错误消息。
(我不是 .NET 专家,我从来没有对 .NET 或 PowerShell 做过一些意外的事情。)
PS C:\\> my-cmdlet
Cmdlet-Ausgabe...
Der Typeninitialisierer für "System.Management.Automation.HostUtilities" hat eine Ausnahme verursacht.
PS C:\\> _
这是德语版的:
PS C:\\> my-cmdlet
Cmdlet output...
The type initializer for "System.Management.Automation.HostUtilities" threw an exception.
PS C:\\> _
有什么方法可以停止这些错误消息(而不影响 PowerShell v3 的功能)? - 谢谢。
(如果您需要有关我的 PowerShell 的更多信息,请编写命令并说明您需要哪些信息。)
(我希望我想问的很清楚。但是,如果不是,请写评论描述不清楚的地方!)
更新:
(Shellin-/运行时输出 $error[0].exception.tostring()
)
PS %> my-cmdlet
Cmdlet-Ausgabe...
Der Typeninitialisierer für "System.Management.Automation.HostUtilities" hat eine Ausnahme verursacht.
PS %> $error[0].exception.tostring()
Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In Zeile:1 Zeichen:1
+ $error[0].exception.tostring()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Der Typeninitialisierer für "System.Management.Automation.HostUtilities" hat eine Ausnahme verursacht.
PS %> _
德语版:
PS %> my-cmdlet
Cmdlet-Output...
The type initializer for "System.Management.Automation.HostUtilities" threw an exception.
PS %> $error[0].exception.tostring()
You cannot call a method on a null-valued expression.
On line:1 char:1
+ $error[0].exception.tostring()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
The type initializer for "System.Management.Automation.HostUtilities" threw an exception.
PS %> _
最佳答案
在“类型初始值设定项”(即静态构造函数)中运行的唯一代码是从资源字符串中填充建议数组的代码。在我看来,资源文件已被删除或损坏,或者您系统的语言/文化设置有些奇怪,阻止了特定于文化的资源检索工作。我建议重新安装 PowerShell 3.0 和/或验证操作系统的语言是否与 PowerShell 安装程序的语言相同。对不起!
关于.net - PowerShell 3 : Every Command Execution Results In "The type initializer [...] threw an exception" Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12445422/
给定一个元素列表,如果每个元素都需要了解此列表中每个其他元素的状态,如何处理所有元素? 例如,在 Python 中实现它的直接方法可能是: S = [1,2,3,4] for e in S: fo
我在嵌套循环方面遇到问题。请看下面的 fiddle : http://jsfiddle.net/7znfmp9o/ 我希望每个部分都能获得视差效果,但是这里发生了一些奇怪的事情。 .each() 代码
好吧,伙计们,我正在尝试在另一个 for every row 循环中执行一个 for every row 循环,我对 mysql 真的很陌生,这是我的第一个触发器我有一个名为 Disponivel 的
我目前正在开发一个基于 Arc-Theme 的 GTK 主题。(你可以在这里看到我目前的进度:https://plus.google.com/u/0/100718986567621730640/pos
我将一个事件设置为某个月的 13 号,并每月重复一次。每个月都会正确地重复它。但是,当将其设置为某个月的 31 日时,它只会设置为 31 日的月份,并且如果它显示在“编辑”->“重复”->“每月重复”
我试图通过在 session 中存储数据来在每个 View 页面中显示记录的用户名。 但是我必须在每个函数中编写相同的两行..我正在获取用户数据,但是还有其他方法可以做到这一点吗?因为我认为重复相同
我需要每天从 8 点到 10 点到 10 点到 30 点每 10 分钟和 30 分钟运行一次任务: start at 8:10 -> 8:30 -> 9:10 -> .. -> 10:30 finis
我已经在文档中进行了一些搜索,并在网上花了一段时间,但找不到解决方案!我希望警报告诉我单击 .thumb 时它处于each() 的哪一次迭代。 EG:有六个.thumb,我点击数字3,浏览器弹出3!
谁能告诉我为什么循环在 5 条目之后没有停止? http://jsbin.com/ucuqot/edit#preview $(document).ready(function() { someA
我对实现 _.every() 有疑问。 我的代码在这里 _.every = function(collection, iterator) { if (collection.length =
我从面向对象编程开始我有以下问题:我开了一个新课然后我就从这门课开始现在,对于每个实例我想做一些事情我用 foreach 循环尝试过,但它不起作用......存在一些语法问题 这是类(class):
我尝试使用 jquery each() 函数在每次迭代后添加 0.5 增量。我必须在 li 上添加 animatoin-delay 属性,该属性的值应该增加 (0.5),以便我可以在文档加载时为它们设
首先看一下这段代码。示例我有 5 个具有必需类的输入字段。 var errMsg = "This is required!" $(function() { $(".required").each
因此,我正在尝试重新创建“every”方法,作为 Eloquent JavaScript 练习的一部分。我不明白为什么第二版不起作用(第一版有效)。 书上说“只有当谓词对数组的所有元素都返回真时,ev
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 6 年前。 Improve this qu
有人可以告诉我为什么这会返回 true 吗?它应该返回 false,因为在第一次迭代中 value[pre] === 0... 谢谢。 function truthCheck(collection,
我正在尝试使用 Array 的 .every 来查看数组中的项目是否是连续的(1、2、3、4、5)。为什么当其中的所有内容都是 true 时返回 false? const nums = [1, 2,
var arr=[]; var k; for(var i=0;i native loop 2: 0ms 嗯,现在有点太快了。也许 arr 应该更大: var arr=[]; for(var i=0;i
这是一些 Javascript 数组方法的常见问题。以下面为例: var numbers = new Array(12, 5, 8, 130, 44); function isBigEnough(el
这个问题已经有答案了: Arrow function without curly braces (9 个回答) When should I use a return statement in ES6
我是一名优秀的程序员,十分优秀!