简体   繁体   中英

Config file not appearing in solution explorer in visual studio

I am new to Visuak Studio and C#. I am trying to add a new file to the config directory in my project. Once I do that, I can see that I am able to see the file in file explorer but once I open the solution (.sln) file, the file is not present there.

I tried to clean the solution -> Build/Rebuild solution but I am still not seeing the file in solution explorer. Also, if I manually add the file in solution explorer then that file is not getting detected in Test Harness. It's as if the file is not there.

In the below picture, config is where I am adding a new xml file.

项目结构

How do I make sure my new file is present under the solution and is detected when I run the test harness?

FYI, all the existing files are getting detected by Test Harness. Just the new file is not getting detected.

Select Showa all files in solution explorer. If there is any unaded file right click on it and then add to solution. Also add it via VS not via explorer. You can store configs in appsettings.json:)

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