Using CodeArtifact in Visual Studio - Amazon Toolkit with Amazon Q
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using CodeArtifact in Visual Studio

Amazon CodeArtifact is a fully managed artifact repository service that makes it easy for organizations to securely store and share software packages used for application development. You can use CodeArtifact with popular build tools and package managers such as the NuGet and .NET Core CLIs and Visual Studio. You can also configure CodeArtifact to pull packages from an external, public repository such as

In CodeArtifact, your packages are stored in repositories which are then stored within a domain. The Amazon Toolkit for Visual Studio simplifies the configuration of Visual Studio with your CodeArtifact repositories, making it easy to consume packages in Visual Studio from both CodeArtifact directly and

Add your CodeArtifact repository as a NuGet package source

To consume packages from your CodeArtifact, you will need to add your repository as a packabe source in the NuGet Package Manager in Visual Studio

To add your repository as a package source

  1. In Amazon Explorer, navigate to your repository in the Amazon CodeArtifact node.

  2. Open the context (right-click) menu for the repository you want to add, and then choose Copy NuGet Source Endpoint.

  3. Navigate to Package Sources underneath the NuGet Package Manager node in the Tools > Options menu.

  4. In Package Sources, select the plus sign (+), edit the name, and paste the NuGet source endpoint URL that you copied earlier in the Source field.

  5. Select the checkbox next to your newly added package source to enable it.


    We recommend adding an external connection to to your CodeArtifact and disabling the package source in Visual Studio. When using an external connection, all of the dependencies pulled from are stored in CodeArtifact. If goes down for any reason, the packages you need will still be available. For more information about external connections, see Add an external connection in the Amazon CodeArtifact User Guide.

  6. Choose OK to close the menu.

For more information about using CodeArtifact with Visual Studio, see Use CodeArtifact with Visual Studio in the Amazon CodeArtifact User Guide.