Developing ASP.NET MVC Web Applications — Question 162

You are developing a NuGet package that will be used by applications that target multiple .NET runtime environments.
You need to include NuGet package references within application project files.
What should you use?

Answer options

Correct answer: A

Explanation

The correct choice is A, as using a PackageReference node is the modern approach for managing NuGet packages in SDK-style projects. Options B and D are outdated methods that do not align with current best practices for multi-targeting .NET runtimes, while C is not a valid option for including package references.