Maven equivalent in .NET C#

Jurass :

Let's assume there are two Maven Java projects, A and B. A has a dependency on B. B is placed in remote Maven repository and also on GitHub.

In IntelliJ Idea IDE, I will open project A and also B (B is cloned from GitHub) in two separate windows.

Now, B has a class named Car. When I 'Ctrl+Left mouse button click' on class Car in project A, IDE switches me automatically to the source code in opened project B. Therefore I can comfortably work together on A and B.

How can I achieve same behaviour with .NET C# and Visual Studio?

NightOwl888 :

The rough equivalent to Maven in the .NET ecosystem is NuGet. NuGet files can be created using the IDE or command-line tools such as dotnet pack or nuget pack. A NuGet file is just a regular .zip file with the .nupkg extension. These files can be hosted on http://www.nuget.org for the general public to consume, on a site such as http://www.myget.org, or on a private hosted NuGet server.

The NuGet tools also have the ability to create debug symbol packages that contain the source code files. The debug symbol packages can be hosted on public or private symbol servers and used in Visual Studio to step through the code, with the configuration options enabled in Visual Studio.

If you open project A in Visual Studio and automatic package restore is enabled and that project has a package reference to project B, when you build the project it will automatically download the NuGet file for project B, unpack it to your local NuGet cache, and use the assembly for project B in your project.

If Visual Studio is configured correctly to find a debug symbols package corresponding to the exact version of project B, it will allow the debugger to step through the code of project B.

AFAIK, opening the code file of project B and then setting a break point is not possible (someone leave a comment if this is wrong), you need to set a breakpoint in project A and then when you step into the line that calls/instantiates the Car class, Visual Studio will open up the code file so you can step through it.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=468331&siteId=1