I have a C# project where the number of classes is heavily increasing and the root project directory is becoming cluttered and unorganized. I want to be able to separate my class.cs files into grouped folders without changing their namespace to perhaps get something like this:
Root directory:
project.shproj
Main.cs
Form1.cs
Form2.cs
> UI_Classes folder
> UI_button.cs
> UI_header.cs
> Services folder
> bgService.cs
> mainService.cs
> Util folder
>calculations.cs
>abstractMethods.cs
>extensionMethods.cs
But in doing so I'm getting type or namespace could not be found errors for the classes which I moved, which is annoying because it's so much more organised and cleaner. Is there some way I can do this?
Please do not suggest organizing my classes into namespaces. I am very aware of that and it is not an option.
Edit: Though the CS0246 errors have red underlines, they don't actually stop compiling and running.
Edit2: Not similar to this other question at all. This is referring to a problem with the Visual Studio move feature which was not used, where multiple files have the same name (none of mine do), were being renamed incorrectly (I'm not doing any renaming) in a web project, which mine is not.
Edit3: Has been happening for awhile and has never caused a noticed problem but 3 conflicts occur in the output window when building:
1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1> No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1> No way to resolve conflict between "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.