title: Baffling c# compiler CS0234 error on Windows 10 only
body: <p>When migrating a working Visual Studio 2010 solution targeting .Net 4.0 from Windows 7 to Windows 10 environment, I encountered a CS0234 compilation error: <strong>The type or namespace name 'My-Namespace-Name' could not be found (are you missing a using directive or an assembly reference?)</strong>. </p>
  
  <p>The trigger of the error appeared to be references to types in 3rd party libraries <a href="https://www.nuget.org/packages/Google.Apis.ShoppingContent.v2/1.16.0.636" rel="nofollow noreferrer">https://www.nuget.org/packages/Google.Apis.ShoppingContent.v2/1.16.0.636</a> in one of my libraries where 'My-Namespace-Name' was also defined. The error message occurred when compiling another library which linked in this library. The 3rd party libraries were installed using NuGet and supported .Net 4.0.</p>
  
  <p>I created a simple test solution with two class libraries to demonstrate the problem. The 3rd party libraries were installed for the 1st library. I declared a single variable of type <strong>ShoppingContentService</strong> from the 3rd party libraries in the 1st library:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Google.Apis.ShoppingContent.v2;
  using Google.Apis.ShoppingContent.v2.Data;
  using Google.Apis.Auth.OAuth2;
  using Google.Apis.Services;
  using Google.Apis.Requests;
  using log4net;
  
  namespace ClassLibrary1
  {
      public class Class1
      {
          //comment out the following declaration the compilation error goes away
          private static ShoppingContentService s_service;
  
          public static void Method1()
          {
              System.Console.WriteLine("hello");
          }
      }
  }
  </code></pre>
  
  <p>The 2nd library references the 1st library. The error was reproduced when compiling the solution pointing to the <strong>using ClassLibrary1;</strong> statement:</p>
  
  <blockquote>
    <p>Error 2   The type or namespace name 'ClassLibrary1' could not be found
    (are you missing a using directive or an assembly
    reference?)   c:\Visual Studio
    2010\Projects\ClassLibrary1\ClassLibrary2\Class2.cs   5   7   ClassLibrary2</p>
  </blockquote>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using ClassLibrary1;
  
  namespace ClassLibrary2
  {
      public class Class2
      {
          public static void Method2()
          {
              Class1.Method1();
          }
      }
  }
  </code></pre>
  
  <p>The solution file can be downloaded from: <a href="https://1drv.ms/u/s!AiZZDdaejTrJrz_9Ayngj9iTopzz" rel="nofollow noreferrer">https://1drv.ms/u/s!AiZZDdaejTrJrz_9Ayngj9iTopzz</a></p>
  
  <p>Switching to VS 2017 does not resolve the problem and neither does changing the target framework to .Net 4.5.</p>
  
  <p>Thanks in advance for taking a look into this issue and any light you can shed on it will be greatly appreciated!</p>