Reputation: 2175
net core environment. I m creating .net core webapi project in visual studio project. I am following https://github.com/allebb/lk2.git project to get hands on with .net core. when i open this solution in visual studio i can see lot of packages installed in dependencies tab as below.
same way i created solution in visual studio 2017 and i got
I can see many packages compared to the sample solution. How can i add all those reference in my test project? Parallel i have setup ubuntu environment with core 2.0 setup. But i am missing many packages in my test project! May i know how can i those missing packages? Any help would be appreciated. Thanks
Upvotes: 0
Views: 1144
Reputation: 7019
These packages are commonly used for database connections and serializing. They are quite popular and you are quite likely to use them once you start creating web applications. There are couple of ways to add them as nuget packages.
install-package package.name
dotnet add package package.name
For more information you can look up nuget.org.
If you want exactly the same libraries, the quickest way is open the csproj file of the git https://github.com/allebb/lk2/blob/master/lk2-demo.csproj and copy the whole <ItemGroup>
section that contains the PackageReference
. Then you can right click on your project and go to restore nuget packages.
To restore the projects via command line (what you can use in linux)
dotnet restore
Update: Since most nugets seem to be of an older version. The quickest would be to copy the references as they are and update all nugets from the nuget manager in one go.
Upvotes: 1