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

≯℡__Kan透↙ 提交于 2020-08-10 04:07:35

问题


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:

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.


回答1:


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


来源:https://stackoverflow.com/questions/56772625/cannot-add-assemblies-to-net-core-application-in-visual-studio-2019

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!