4

I have an ASP.Net Core 2.2 application.

MyApp.Sln

  • MyApp.API (ASP.Net Core 2.2 API Based project)
  • MyApp.Services (CL-Class Library)
  • MyApp.Contracts - (CL-Class Library)
  • My.Services.Tests - (CL-Class Library)

The above projects have different libraries(NuGet packages) installed

In .Net framework we used to have packages.config thats lists the nuget packages with the version details.

Where I can find the same details in .Net Core 2.2 ?

Because different project in one sln should not have different version of NuGet.

Thanks!

Tony Ngo
  • 19,166
  • 4
  • 38
  • 60
Kgn-web
  • 7,047
  • 24
  • 95
  • 161
  • you can see list of `nuget` packages with the version details by right click on your project and select `Edit your project name`. for MyApp.Services project `Edit MyApp.Services`. – Farhad Zamani Sep 07 '19 at 11:07

3 Answers3

9

You can right Click in Your project in Solution explorer and Edit(For example MyApp.Services.csproj) in this file you will See Packages

2

You can follow this link to see options

Default command Running in the project folder - Shows all packages, by default

dotnet list package <optional project path or solution path>
Tony Ngo
  • 19,166
  • 4
  • 38
  • 60
1

I don't believe there is anything equal to packages.config in .Net Core (possible reason - it aims to be more modular). You will have to make a little bit of work to solve your issue.

The quickest way to get dependecy graph is to run

dotnet msbuild YourProject.sln /t:GenerateRestoreGraphFile /p:RestoreGraphOutputPath=graph.dg

from terminal. Then you can open it with any editor and view all your dependencies in one file.

If this file isn't enough for you, you will (unfortunately) have to do a little bit of dirty work. See this answer View nuget package dependency hierarchy for some really good solutions, like how to write your own application to print dependencies, or how to use NPM.

Karel Křesťan
  • 399
  • 2
  • 17