.NET

NuGet Package Management

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

16 Interview-Fragen·
Mid-Level
1

What is a NuGet package?

Antwort

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?

Antwort

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?

Antwort

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 Interview-Fragen

Meistere .NET für dein nächstes Interview

Zugang zu allen Fragen, Flashcards, technischen Tests, Code-Review-Übungen und Interview-Simulatoren.

Kostenlos starten