Recreate project files

Unity bugged out on me and it wouldn’t start so I backed up my Assets folder (which contained all my data).
I uninstalled Unity, purged its files, every registry named after Unity I could find. Removed .meta files from my backed up folder. Then I installed fresh Unity Hub and Unity Editor. Created a fresh new project, copied my Assets folder into there. Unfortunately every single texture just decided to crap out on me (which I guess was in meta files).

After setting JetBrains as default editor in Unity I double click a file, but JetBrains opened it as single file. After I copied over .sln and .csproj files from my backup into the new project, it did recognize the entire project, there were no errors in namespace but there are errors in files.

IDE tells me that I can remove a namespace reference using UnityEngine (autocomplete works, so namespaces are detected) because its never used, but right below it there’s a function that relies on MonoBehaviour and it says “Cannot resolve symbol MonoBehaviour”.

Restarting JetBrains, Unity 2018.4 or Unity 2019.3.13f does not regenerate the files.

GetComponent<T>() is not recognized.
IDE wants to update from Debug.Log("test"); to System.Diagnostics.Debug.Log("test");.

It does see the namespaces, but no its classes.

PS: Changing project framework in Unity from 2.0 to 4.x, didn’t fix the situation.
PS 2: Changing project “MSBuild” in JetBrains to either 4.0 or 16.0(?!), didn’t fix the situation.

Unity is an eternal mystery to me. Things stop working for no apparent reason, then they start working for no apparent reason. I almost feel like an engineer.

Issue has been “fixed”. I don’t know how.