.NET

NuGet Package Management

NuGet packages, package sources, versioning, dependency resolution, package creation

16 pytań z rozmów·
Mid-Level
1

What is a NuGet package?

Odpowiedź

A NuGet package is a ZIP archive with the .nupkg extension containing compiled code (DLL), associated files, and a manifest describing the package content and metadata. It is the standard mechanism for distributing and sharing reusable code in the .NET ecosystem. Packages can be hosted on nuget.org or on private feeds to facilitate reuse within an organization.

2

What is the recommended format for managing package references in modern .NET projects?

Odpowiedź

PackageReference is the modern NuGet package management format, introduced with .NET Core and recommended for all new projects. Unlike packages.config, it stores references directly in the .csproj file, providing better transitive dependency management, faster restores, and native MSBuild integration. This format also simplifies package updates and reduces merge conflicts.

3

What is the default public NuGet package source?

Odpowiedź

nuget.org is the official public NuGet package gallery, hosting hundreds of thousands of free and open-source packages. It is the default source configured in .NET tools and Visual Studio. Developers can also configure private feeds like Azure Artifacts or GitHub Packages to host packages internal to their organization.

4

How to add a NuGet package to a project using the .NET CLI command line?

5

What is a transitive dependency in the NuGet context?

+13 pytań z rozmów

Opanuj .NET na następną rozmowę

Uzyskaj dostęp do wszystkich pytań, flashcards, testów technicznych, ćwiczeń code review i symulatorów rozmów.

Zacznij za darmo