简体   繁体   English

VS2015中的Service Fabric,PowerShell脚本执行失败

[英]Service Fabric in VS2015, PowerShell script failed to execute

I'm doing the Service Fabric tutorial that can be found here: 我正在做Service Fabric教程,可以在这里找到:

https://azure.microsoft.com/en-us/documentation/articles/service-fabric-create-your-first-application-in-visual-studio/

I started PowerShell (in Windows 10 running in Parallels through OS X) as administrator an executed this according to instructions: 我以管理员身份启动了PowerShell(在通过OS X通过Parallels运行的Windows 10中),并根据说明执行了此操作:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

I have started Visual Studio 2015 both as admin and normally. 我已经以管理员身份和正常方式启动了Visual Studio 2015。 I then started the tutorial app, but I'm getting the following error: 然后,我启动了教程应用程序,但出现以下错误:

The PowerShell script failed to execute. See the Output window for details.

The output window just gives this: 输出窗口仅显示以下内容:

2>Finished executing script 'Set-LocalClusterReady'.
2>Time elapsed: 00:00:03.1922793
2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Any ideas to what could be wrong? 有什么想法可能会出错吗?

UPDATE: I actually get the following error: 更新:我实际上收到以下错误:

2>EnsureAdminPrivileges : Not running as administrator. You need to run Visual Studio with administrator privileges

Which is strange because I have started VS as administrator... 这很奇怪,因为我已经以管理员身份启动了VS。

In my case, the solution was that I first needed to close Visual Studio and the run it as an administrator . 就我而言,解决方案是我首先需要关闭Visual Studio以管理员身份运行它

Very simple solution to an annoying error. 解决烦人的错误的非常简单的解决方案。

I had this error in VS17 RC as well as Unable to determine whether the application is installed on the cluster or not . 我在VS17 RC中有此错误,也无法确定是否在群集上安装了该应用程序 It seemed as if the deployment of the local cluster had some issues. 似乎本地集群的部署存在一些问题。

What solved it for me was to run Repair from the Visual Studio setup. 对我来说解决的是从Visual Studio安装程序运行修复

After repairing, the cluster deployed as expected and I had no more error messages. 修复后,群集按预期部署,并且没有其他错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “PowerShell脚本无法执行”,VS15上的Service Fabric应用程序升级没有错误消息 - No error message on “The PowerShell script failed to execute”, Service Fabric app upgrade from VS15 在VS2015中调试Powershell无法可视化XML对象 - Debugging Powershell in VS2015 Can't Visualize XML objects 未找到请求值'VS2015'。 - Azure powershell - Requested value 'VS2015' was not found. - Azure powershell VS2015:设置Powershell模块解决方案的最佳方法是什么? - VS2015: What is the best way to setup a Powershell module solution? 为什么VS2015中的TestExplorer无法加载Pester模块? - Why TestExplorer in VS2015 failed to load Pester module? PowerShell脚本执行失败-ServiceFabric - The PowerShell script failed to execute - ServiceFabric 如何从C#执行Service Fabric Powershell命令? - How to Execute Service Fabric Powershell commands from c#? 在VS2015中获取Nuget软件包的许可证 - Get licenses for the Nuget Packages in VS2015 Azure Service Fabric-自动生成PowerShell脚本以重新创建 - Azure Service Fabric - Auto generate PowerShell script to recreate Powershell脚本以静默方式安装Azure Service Fabric SDK,运行时和工具 - Powershell script to install Azure Service Fabric SDK, runtime and tools silently
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM