简体   繁体   中英

Can't access namespaces from Nuget Package

I have an Identity Server 3 Project where I need to install a couple of custom Nuget Packages, that comes from a private Nuget Package repository in my company. This Nuget is installed and running in many other web projects so it is most likely not the problem.

When I install the package on Identity Server Project, logs say everything was fine and the package was successfully installed. It is listed on Project References. But when I try to access it anywhere on Identity Server Project, it just isn't accessible. I can't set up an using reference, neither call any methods by using it's full namespace (InstalledNuget.Services.Example). Visual Studio's intellisense returns "The type or namespace name does not exist in namespace 'company' (are you missing an assembly reference?)".

While investigating the issue, I found out that it is listed on Project References, but not on Object Browser.

I tried:

  • reinstalling the package;
  • restarting Visual Studio;
  • Deleting the packages folder and let the program restore then again;

I have been to several posts here and other websites but did not find a problem matches this one. Any hints?

The error was some visual bug on Visual Studio. I accidentally clicked on run, and it run successfully, with errors still on the screen. It ignored then completely.

Then I manually removed "bin" and "obj" folders and everything returned to normal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM