I have a few using statements in my class. ReSharper says I need to add another namespace so I let it add it. It adds it at the top, outside the namespace declaration and we are all good.
But StyleCop says that the usings need to be INSIDE the namespace declaration. So I move the using statement inside, but then when I hover over the using statement, it says it's a different namespace. Example below:
using Owin; // when I hover, it shows up as "Owin", which is correct
namespace MyCompany.Sales.Web
{
using System.Configuration;
using System.Web.Http;
After moving it down, it looks like this:
namespace MyCompany.Sales.Web
{
using System.Configuration;
using System.Web.Http;
using Owin; // but when I hover, it shows up as "MyCompany.Owin"
How do I stop visual studio from thinking it needs the "MyCompany" part of the namespace. Keep in mind, there IS a namespace called "MyCompany.Owin", but I do NOT have a reference to it in the project.
using global::Owin;
though I'm not sure theglobal::
modifier can be used with namespaces. – Lasse V. Karlsen