Using CodeArtifact in Visual Studio - AWS Toolkit for Visual Studio

Using CodeArtifact in Visual Studio

AWS 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 AWS 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 AWS Explorer, navigate to your repository in the AWS 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 AWS 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 AWS CodeArtifact User Guide.