.NET

NuGet Package Management

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

16 câu hỏi phỏng vấn·
Mid-Level
1

What is a NuGet package?

Câu trả lời

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?

Câu trả lời

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?

Câu trả lời

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 câu hỏi phỏng vấn

Nắm vững .NET cho lần phỏng vấn tiếp theo

Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.

Bắt đầu miễn phí