Whenever I try to add a file to my Visual Studio project, I get the following warning:
The file [filename] could not be added to the project. This fil
Go in to your Windows File Explorer and navigate to the .csproj file and open it with Notepad (or advanced text editor like NotePad++)
You will notice two lines that have similar or duplicate Compile Include lines:
"SubDir\MyClass.cs"
Remove the Above line and keep only the line similar to the one below: