title: Visual Studio C++ testing "name must be a namespace name" error
body: <p>Here is what I did:</p>
  
  <p>I first created a <strong>Win32ConsoleApplication</strong></p>
  
  <p>Here is the code in it:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; "Hello World!" &lt;&lt; endl;
  
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>Then I add a <strong>Native Unit Test Project</strong></p>
  
  <p>In the unit test solution, I right click on the  <strong>References</strong> tab, and then add by <strong>ConsoleApplication2</strong> (name of project) reference.</p>
  
  <p>Then I go to the <strong>unittest.cpp</strong> and this is what I see:</p>
  
  <pre><code>#include "stdafx.h"
  #include "CppUnitTest.h"
  
  using namespace Microsoft::VisualStudio::CppUnitTestFramework;
  
  namespace UnitTest8
  {       
      TEST_CLASS(UnitTest1)
      {
      public:
  
          TEST_METHOD(TestMethod1)
          {
              // TODO: Your test code here
          }
  
      };
  }
  </code></pre>
  
  <p>At the very top I add my own namespace, like this:</p>
  
  <pre><code>using namespace Microsoft::VisualStudio::CppUnitTestFramework;
  using namespace ConsoleApplication2;
  </code></pre>
  
  <p>but then it's an error saying <code>name must be a namespace name</code>. Why is this? What did I do wrong?</p>