Search code examples
powershellvisual-studio-2015azure-service-fabric

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


Solution

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