简体   繁体   中英

Service Fabric in VS2015, PowerShell script failed to execute

I'm doing the Service Fabric tutorial that can be found here:

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:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

I have started Visual Studio 2015 both as admin and normally. 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...

In my case, the solution was that I first needed to close Visual Studio and the run it as an administrator .

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 . 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.

After repairing, the cluster deployed as expected and I had no more error messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM