Steps for the error:
I have created a "Service Fabric Application" with WebApi both in .net Framework 4.6.1 in Visual Studio 2017.
Then I created a Class library to access sql data by virtue of Entity Framework.
Attached Entity Framework to Web API application by virtue of NugetPackage and setting reference from Webapi to Class library project to fetch datacontext.
Created a Controller class to access entity framework datacontext.
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
I have tried to "Reset Local Cluster" but no result.
I have tried to "Setup Local Cluster" with 1 Node : it shows to me an error :Failed to setup local cluster
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.