AZ-400 Question 95
Select 2Your company manages several .NET microservices using Azure DevOps. The development teams have created shared libraries that must be consumed by multiple projects. You need to design a package management strategy that allows each team to publish and consume these libraries in a consistent and secure manner using Azure Artifacts. Which two approaches should you recommend to ensure a robust, maintainable package management solution?
- A
Configure a private NuGet feed with role-based permissions that limit publish and consume access to approved users or groups.
- B
Use universal packages instead of NuGet feeds for all .NET dependencies to simplify the package structure.
- C
Implement a CI pipeline that automatically increments package versions (e.g., via semantic versioning) and publishes them to the private feed.
- D
Grant read access to the feed for all external contributors to maximize collaboration across potential projects.
Show answer and explanation
Correct answers: A, C
Explanation
When designing a package management strategy in Azure DevOps, it is best practice to use private NuGet feeds for .NET projects to make full use of tooling such as version validation and dependency management. Securing the feed with role-based permissions ensures only authorized users can modify or download packages. Additionally, automating versioning through your CI pipeline helps maintain consistent, traceable releases. For further details, refer to the Azure Artifacts documentation (https://learn.microsoft.com/azure/devops/artifacts/).
- A. Correct.
Option 1 is correct. When using Azure Artifacts, creating a private NuGet feed with appropriate role-based permissions ensures that only authorized users can publish and consume packages. This approach prevents unauthorized changes and protects intellectual property. Fine-grained access control is a best practice recommended by Azure DevOps documentation.
- B. Incorrect.
Option 2 is incorrect. Universal packages are a generic solution that can store any kind of file, but they are not specifically optimized for .NET dependencies like NuGet packages. While universal packages can be helpful for certain artifacts, .NET libraries benefit from the native NuGet format, tooling, and ecosystem.
- C. Correct.
Option 3 is correct. Implementing semantic versioning in your CI pipeline and automatically publishing packages to your feed is a recommended practice. It ensures each build produces a uniquely versioned package, making it easier to track and roll back versions when necessary.
- D. Incorrect.
Option 4 is incorrect. Granting blanket read access to external contributors can expose your proprietary packages and may violate security and compliance requirements. Access should be restricted to the teams that genuinely need the libraries, and external collaboration should be carefully managed through specific permissions.