hdkrus
hdkrus

Reputation: 430

Cannot add assemblies to .Net Core application in Visual Studio 2019

When I try to add a missing assembly to my project (for unit testing specifically) I noticed that the Assemblies tab is missing in the "Add Reference" dialog , see:

enter image description here

Is this a bug or a expected behavior? If it's expected how we are supposed to add the missing assemblies.

Note that I already tried through Nuget package manager and still didn't work.

Upvotes: 8

Views: 15730

Answers (2)

norgie
norgie

Reputation: 517

You can add external assemblies, e.g. Rebex, by right clicking your project, select Add >> Project Reference... >> Browse and then hit the Browse button.

I've just done that using VS2019 v.16.9.4 on a .Net Core 3.1.x project. No problem at all.

Upvotes: 6

Robert Perry
Robert Perry

Reputation: 1956

It is correct behaviour. The Assemblies tab is not available for Net Core projects. You wont be able to add assemblies from your system, because Net Core projects work with dependencies from Nuget. So, to add your references, you need to use the Nuget Package Manager instead.

  1. Right click your project
  2. Choose "Manage Nuget Packages"
  3. Find the package you want to add from the list

Upvotes: 14

Related Questions