简体   繁体   中英

VS intellisense not working on solution with multiple projects

I am working on a .NET Core/C# solution that contains multiple projects. I have done so before but for this one I set up everything through a remote server in a linux terminal. Once all my projects were created and pushed to GitHub, I pulled to my local machine. Problem I am running into is that intellisense is not working at all in any project in my solution. I am wondering if I set up everything correctly or if there is something I am missing. Below is some screenshots of my directory and one screenshot of VS.

root dir from repo来自 repo 的根目录

1 dir down into BlabberApp folder 1 dir 进入 BlabberApp 文件夹

2nd dir down into BlabberApp.DomainTest 第二个目录进入 BlabberApp.DomainTest

What is shown in VS when I open root dir打开根目录时 VS 中显示的内容

What is shown in VS when I open solution file打开解决方案文件时 VS 中显示的内容

I have tried opening using open file for: .csproj file, .cs file, as well as open folder for various folders that hold my separate projects. I also tried to open folder to the BlabberApp folder which contains the folders that hold my.sln as well as the folders that hold all my separate projects. I need intellisense to recognize references some projects have with each other. I also need it to recognize my tests to properly test everything. One thing peculiar I found is when I open the.sln file it shows in the solution explorer that 0 projects are loaded. Also none of my tests are recognized in the test explorer (I have tried cleaning and building the sln with no changes showing in test explorer).

I have also gone through the steps of going to tools -> options -> text editor -> c# -> intellisense to check/uncheck the boxes under completion lists. Any advice would be helpful! Thanks

It seems any of your projects are not listed in your solution. Somehow they unloaded from the solution. You can add the projects one by one in the solution. Or you can take help of a plugin that will add all projects from the solution folder at once. please add them by the following step:

  1. Add this VS extension
  2. Right-click on the solution and click on Add multiple projects
  3. check Add solution folder
  4. Click Load Projects From Folder
  5. Select the solution directory
  6. Select all projects
  7. Click start

please follow the link instructions for more details.

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