相关疑难解决方法(0)

由于"无法初始化PowerShell主机",无法安装nuget包

突然之间,升级Nuget软件包时出现此错误.我遇到过的修复工作都没有.我正在使用Visual Studio 2013.

已经安装了"Newtonsoft.Json 6.0.3".

将"Newtonsoft.Json 6.0.3"添加到Tournaments.Notifications中.

成功将"Newtonsoft.Json 6.0.3"添加到Tournaments.Notifications中.

执行脚本文件'F:\ My Webs\BasketballTournaments\MainBranch\packages\Newtonsoft.Json.6.0.3\tools\install.ps1'.

无法初始化PowerShell主机.如果PowerShell执行策略设置设置为AllSigned,请打开程序包管理器控制台以首先初始化主机.

包管理器控制台

尝试在"FileSystem"提供程序上执行InitializeDefaultDrives操作失败.

如果我等待初始化在控制台中完成,我可以添加一些包.

powershell powershell-2.0 nuget nuget-package visual-studio-2013

171
推荐指数
11
解决办法
10万
查看次数

在Windows 8上使用PowerShell 2作为默认版本

我想在Windows 8上使用PowerShell 2作为默认的PowerShell版本而不指定-Version开关.

我开始使用PowerShell 3附带的Windows 8 RTM,我的脚本与PowerShell 3不兼容.

powershell powershell-3.0

7
推荐指数
1
解决办法
6318
查看次数

NuGet包管理器控制台无法加载PowerShell

执行从Windows 7 Pro到8 Pro的就地升级后,我无法让NuGet的包管理器控制台在Visual Studio 2012 Pro中运行.我收到的错误是:

The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2977) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2984) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error …
Run Code Online (Sandbox Code Playgroud)

powershell visual-studio nuget

5
推荐指数
1
解决办法
2014
查看次数

Visual Studio 2017 - 无法初始化 powershell 主机

第一天:

System: Windows 10
Microsoft Visual Studio Community 2017 
Version 15.5.5
VisualStudio.15.Release/15.5.5+27130.2026
Run Code Online (Sandbox Code Playgroud)

我有一个正在使用 WindowsAzure.Storage NuGet 包的网站项目。

在 Visual Studio 中,我执行以下操作:

Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution ...
Run Code Online (Sandbox Code Playgroud)

系统显示有2个更新可用:

Newtonsoft.Json v10.0.3 (currently installed v9.0.1)
WindowsAzure.Storage v9.0 (currently installed v8.7)
Run Code Online (Sandbox Code Playgroud)

我选择选中“选择所有包”复选框,然后单击“更新”按钮。

失败(以前从未发生过这种情况)!

以下是从 Visual Studio 捕获的输出:

Retrieving package 'WindowsAzure.Storage 9.0.0' from 'nuget.org'.
...
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be …
Run Code Online (Sandbox Code Playgroud)

powershell visual-studio nuget-package

5
推荐指数
1
解决办法
1万
查看次数