Search code examples
azureasp.net-web-apiazure-sql-databaseazure-web-app-serviceazure-service-fabric

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


Steps for the error:

  1. I have created a "Service Fabric Application" with WebApi both in .net Framework 4.6.1 in Visual Studio 2017.

  2. Then I created a Class library to access sql data by virtue of Entity Framework.

  3. Attached Entity Framework to Web API application by virtue of NugetPackage and setting reference from Webapi to Class library project to fetch datacontext.

  4. Created a Controller class to access entity framework datacontext.

  5. While running the application I am getting the Error(there is no build error rather it is showing Error: "The 'packages' element is not declared ") like

enter image description here

  1. After build it is showing build successful but this error is coming:

enter image description here

  1. I checked the packages.config file . it shows as follows :

enter image description here

  1. Below is the Output window .

enter image description here

  1. I have tried to "Reset Local Cluster" but no result.

  2. I have tried to "Setup Local Cluster" with 1 Node : it shows to me an error :Failed to setup local cluster

enter image description here


Solution

  • Your error is:

    'Test-ServiceFabricClusterManifest' is not recognized as a cmdlet...
    

    Try reinstalling the most current version of the Service Fabric SDK and see if the cmdlet works in a standalone shell.

    The warning for the packages.config is a default Visual Studio behavior, which has got nothing to do with your problem. If you close the file the warning will go away.