Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Had to reinstall operating system and Visual Studio 2017 - now EPiServer using directives show up as being un-used

Vote:
 

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:

  • using EPiServer;
  • using EPiServer.Core;
  • using EPiServer.ServiceLocation;

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.

#205751
Jul 23, 2019 15:34
Vote:
 

It appears all I had to do was build the project once right after setting everything up.

After having built the project, now when I browser the various .cs files, the using statements are showing up correctly as being used where relevant.

#205753
Jul 23, 2019 15:55
Vote:
 

Yes, Sometimes it happens. so basic step that I follow-

  1. Restart the visual studio.
  2. Clean and rebuild the solution.
  3. Delete the obj and bin folder from all the project that is in the current solution.

Thanks

Ravindra

#205801
Jul 24, 2019 8:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.