The typeor namespace name 'System' could not be found in the global namespace code example
Example: the type or namespace name 'system' could not be found visual studio 2019
Clean your solution
Do a rebuild
Close visual studio
and re-open
That's it!