title: Building .NET 4.0 project on Windows server 2016, Window 10
body: <p>We recently need to upgrade our build server from Windows server 2008 to 2016. Because 08 is fading out</p>
  
  <p>As we all know, Windows Server 2016 is installed with .NET Framework 4.6 and from <a href="https://docs.microsoft.com/en-us/dotnet/framework/install/on-windows-10" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/framework/install/on-windows-10</a></p>
  
  <ul>
  <li><p>You can only have one version of the .NET Framework 4.x installed on your machine.</p></li>
  <li><p>You cannot install an earlier version of the .NET Framework on your machine if a later version is already installed.</p></li>
  </ul>
  
  <p>The case is, we have many projects using </p>
  
  <ol>
  <li>.NET 4.0 with EF 4.4.0.0</li>
  <li>.NET 4.5 with EF 5.0.0.0</li>
  </ol>
  
  <p>And some classes such as System.ComponentModel.DataAnnotations.Schema.ColumnAttribute had moved from EF to .NET from EF 4.4.0.0 to .NET 4.5 along the upgrade.</p>
  
  <p>Therefore, missing .NET 4.0 results in:</p>
  
  <blockquote>
    <p>error CS0433: The type
    'System.ComponentModel.DataAnnotations.Schema.ColumnAttribute' exists
    in both ...\workspace\....\EntityFramework.dll and 
    ...\Windows\Microsoft.NET\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll'</p>
  </blockquote>
  
  <p>because it trys to use .NET 4.5 with EF 4.4.0.0.</p>
  
  <p>My question is: we don't have resources to ask QA teams to have a full test on every aspects of our applications, but we do need to use the new build server. Do you guys have any other idea / thought thats worth trying so that the it can build?</p>