This is a weird one. I have a C# Class Library project within my solution. If I open a .cs
file within this project, the Project
drop-down on the c
How I solved my issue:
After trying all the other offered solution, what worked for me is:
.gitattributes
file.*.xproj text eol=crlf
So that my VS2015 xproj style .NET Core/Standard projects worked again.
Turned out that my git
was putting UNIX style EOL, which was confusing VS.
Check that link https://www.reddit.com/r/VisualStudio/comments/b8vbj8/help_netf461_project_opened_in_vs2019_all_files/
On the side window of "Microsoft.Net.Compilers" click the update button
So, just update Microsoft.Net.Compilers according to you vs's version
Here is the Solution:
I had this problem in VS2019 after upgrade from 2017. Clean and rebuild of solution fixed it.
If it's not showing up in your Solution Explorer, try clicking the "Show All Files" button at the top of Solution Explorer. If the files become visible and are located under the project you expect them to be in, but the file still has "Miscellaneous" listed as its project, then right click the files and select "Include in Project". Otherwise try dragging them to the proper project.
I just hit this issue in VS 2017 and this is what worked for me.