Run the command "Get-Help entityframework failed in Visual Studio 2019 - asp.net-web-api

I am studying to develop web api by using .NET Core 5.0. At this time I am studying Entity Framework. I have already installed Entity Framework Core and Entity Framework tools in Visual Studio 2019.
However when I run the command
Get-Help entityframework
in the Package Manager console, I get an error as shown below. Can anyone help resolve this issue?
Get-Help : Get-Help could not find entityframework in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
Get-Help entityframework
CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

if you have installed only Microsoft.EntityFrameworkCore.SQLServer Package then you are not able to run any entity framework package manager console commands if want to run add-migration or other related commands then you need install Microsoft.EntityFrameworkCore.Tools package also

First install Microsoft.EntityFrameworkCore.Tools with the help of NuGet Package Manager.

Related

How can I use netstandard2 using .net Framework 4.5?

I'm trying to install the package WebSocketSharp.Standard but I getting installing error.
Install-Package : Could not install package 'WebSocketSharp.Standard 1.0.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly
references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
Install-Package WebSocketSharp.Standard -Version 1.0.3
CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I download the NuGet and extract and I check the library only the netstandard2.0
how can I use the package in my current project? Im using VS2013.
.Net standard 2.0 support works starting with .net framework 4.6.1, but you get a lot of system DLLs next to your app. So use .net 4.8 and not 4.6.x.
The minimum requirement to use .net standard libs is to use Visual Studio 2015 (with the update 3 + a special hotfix), but it is better to use VS2017 or 2019:
If you only need to consume .NET Standard 2.0 libraries in your
projects, you can also do that in Visual Studio 2015. However, you
need NuGet client 3.6 or higher installed.
So your VS2013 is too old.

No option for adding online packages in VS 2017 Community

I am trying to install a few online or external packages into my project using nuget in Visual Studio 2017. I tried the package console and it fails. The problem seems to be that the only package source I have available as an option is "Microsoft Visual Studio Offline". There is no "All" option in the package source drop down at the top of the package console, which I believe I need to see if I am trying to add online packages. I have searched all over the place for what might be a simple answer, but all answers seem to deal with other related matters and not specifically this one. Maybe I didn't type the correct phrase to yield results, but I tried and couldn't find them. What am I missing? A setting? Not the correct license? Thanks.
PM> install-package jquery
install-package : Unable to find package 'jquery'
At line:1 char:1
+ install-package jquery
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Go to manage NuGet package manager, click to setting gear button.
Then add new package source:
Name: nuget.org
URL: https://api.nuget.org/v3/index.json

Update nuget package with option -IgnoreDependencies get error

I could not update the WindowsAzure.Storage NuGet Package with the option -IgnoreDependencies. When I update it with following command in the Package Manager Console, I always get the error:
update-package WindowsAzure.Storage -IgnoreDependencies
The error:
Update-Package : packages
At line:1 char:15
+ update-package <<<< WindowsAzure.Storage -IgnoreDependencies
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
Now my workaround is uninstall that package, then install it with the option -IgnoreDependencies. But I have a lot of projects and I need update it frequently. So I want to know the best way to resolve this issue.
Thanks in advance.
Update nuget package with option -IgnoreDependencies get error
I can reproduce this issue on one computer, but I can not reproduce it on another computer. I compared all the differences between them, the final finding is the NuGet Package Manager for Visual Studio version of the difference when you update the nuget package WindowsAzure.Storage with option -IgnoreDependencies.
The version of NuGet Package Manager for Visual Studio on the computer which have the issue is 3.4.4.1321, the version on another one is 3.5.0.1996. So to resolve this issue, please update the nuget package manager to the 3.5.0.1996:
Uninstall the 3.4.4 from Tools->Extensions and Updates->NuGet Package Manager for Visual Studio. Restart the Visual Studio. Then install the 3.5.0.1996 from nuget.org, restart the Visual Studio.
Note: This issue only occurred when you update the nuget package WindowsAzure.Storage from 4.3.0 with -IgnoreDependencies option.

Visual Studio 2017 Professional- Unable to find package at source

I was trying to add package through nuget package manager=> package manager console and from Manage Nuget packages from solution directly. I am trying to install Newtonsoft.Json from Package Manager Like this Install-Package Newtonsoft.Json but unable to find from the source i.e
Name: nuget.org
Source: https://api.nuget.org/v3/index.json
This gives me result like this:
PM> Install-Package Newtonsoft.Json
Install-Package : Unable to find package 'Newtonsoft.Json' at source ''.
At line:1 char:1
+ Install-Package Newtonsoft.Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:01:30.2571879
I think that the source here is blank. May be because of that it is unable to load packages. I have tried to manage the package manager setting but not been able to connect. My package manager setting is like this:
Despite of having good connection of internet I am not been able to install package. My questions are:
How should I install package?
What am I doing wrong to install package?
Assuming you are using Windows OS
Have you initialised vs 2017 after installation or Have you updated your vs 2017?
If not then please initialized it.
Restart your PC.
Open your project in vs 2017
Check your nuget package manager settings.
Name:nuget.org
Source:api.nuget.org/v3/index.json
Now, run nuget package manager from tools=>Nuget Package Manager=>Package Manager Console and write your install-package command or run Manage nuget package manager for solution from tools=>Nuget Package Manager=>
Hope,it helps you.
Your VS 2017 is probably using some kind of proxy setting which is preventing it from accessing the internet.
To check if VS can access internet try opening any web page from within VS Browser. If you cannot browse then my hunch is correct.
Solve the proxy issue and you should be fine.
Hope it helps.
I resolved this issue by adding nuget.org which was missing in my package source.
Go to Tools>Nuget package manager>Package Sources>
Click Plus sign >
Name: nuget.org
Source : https://api.nuget.org/v3/index.json
Now your Visual studio will be connected to Internet and package will be downloaded successfully.

Unable to Add System.ServiceModel Nuget Package in Xamarin Form PCL Project

I am trying to follow the official xamarin tutorial to make use of WCF Services from a Xamarin Form PCL project (URL /guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/ on Xamarin website)
However, at the time of referencing the System.ServiceModel nuget package, I get the following error and the package does NOT get installed:
Could not install package 'System.ServiceModel 1.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I also tried profile 78 without luck (I removed Windows Phone 8.1 as explained here since there is no WCF support).
I tried different profiles for the PCL project as explained here, but without success.
Also, I tried using the Package Management Console and got similar error:
PM> Install-Package -Verbose
cmdlet Install-Package at command pipeline position 1
Supply values for the following parameters:
Id: System.ServiceModel
GET ... OK
Attempting to gather dependency information for package 'System.ServiceModel.1.0.0' with respect to project 'Mobile\MobileCashRegister', targeting '.NETPortable,Version=v4.5,Profile=Profile7'
Attempting to resolve dependencies for package 'System.ServiceModel.1.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'System.ServiceModel.1.0.0'
Resolved actions to install package 'System.ServiceModel.1.0.0'
Install failed. Rolling back...
Package 'System.ServiceModel.1.0.0' does not exist in project 'MobileCashRegister'
Package 'System.ServiceModel.1.0.0' does not exist in folder 'C:\dev\DevCuddlUpSolution\packages'
Install-Package : Could not install package 'System.ServiceModel 1.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', but the package does not contain any assembly
references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
How can I know which profile needs to be selected for the System.ServiceModel nuget package to be installed successfully?
Please note I am using Visual Studio 2015 Professional and the latest available Xamarin.
System.ServiceModel 1.0.0 does not contain any assemblies in any lib folders. It just seems to contain NuGet.exe so you will not be able to use it.
It is also not an official Microsoft NuGet package.

Resources