After reinstalling the operating system and then installing Visual Studio, I added the required NuGet packages and also the EPiServer CMS Extension.
I restarted the computer.
I then opened our EPiServer project and opened a .cs file to look at my code.
All the EPiServer related using directives, such as:
Are showing up in grey, with a red underline. If I hover with the mouse over them, Visual Studio informs me that they are unncessary and not being used. Which is not correct.
Any code that requires them is also showing up with red underlines.
Any help would be appreciated.
It very much sounds like the (nuget) packages are not installed.
If you've only just installed the VS extension, you may not have added the Episerver Nuget feed as a Package Manager Source.
Have a look at this page https://world.episerver.com/installupdates which describes how to do this. Follow the steps under "Adding the Episerver NuGet feed".
With that done, build the solution and it should bring down the packages and remove the grey and red underline... and run hopefully!