title: How can a .NET 4.5.2 app still compile on a build server with only 4.5.1 installed?
body: <p>This has me completely baffled. I am testing upgrading our build infrastructure to .NET 4.5.2, which is currently on .NET 4.5.1.</p>
  
  <p>My first step was to create an ASP.NET MVC project on my developer machine targeting .NET 4.5.2. I am using VS 2013 and have the 4.5.2 Developer Pack installed. I have written some superfluous code utilizing methods that are only supported in .NET 4.5.2:</p>
  
  <pre><code>public ActionResult Index()
  {
      if (!Response.HeadersWritten)
          Response.AddOnSendingHeaders((c) =&gt; { c.Response.AddHeader("Foo", "Bar"); });
  
      return View();
  }
  </code></pre>
  
  <p><a href="https://msdn.microsoft.com/library/system.web.httpresponse.headerswritten.aspx" rel="nofollow"><code>Response.HeadersWritten</code></a> and <a href="https://msdn.microsoft.com/library/system.web.httpresponse.addonsendingheaders.aspx" rel="nofollow"><code>Response.AddOnSendingHeaders</code></a> are only introduced in the .NET 4.5.2 version of <code>System.Web.dll</code>. As expected, this compiles fine locally.</p>
  
  <p>Prior to upgrading the build server to 4.5.2 I thought I'd just run a build of the above project on the build server from source control to see it fail. However the build completes successfully, only reporting the following warning:</p>
  
  <blockquote>
    <p><strong>The reference assemblies for framework ".NETFramework,Version=v4.5.2"
    were not found.</strong> To resolve this, install the SDK or Targeting Pack for
    this framework version or retarget your application to a version of
    the framework for which you have the SDK or Targeting Pack installed.
    Note that assemblies will be resolved from the Global Assembly Cache
    (GAC) and will be used in place of reference assemblies. Therefore
    your assembly may not be correctly targeted for the framework you
    intend.</p>
  </blockquote>
  
  <p>I pull down the compiled binaries from the drop to my local machine and the app runs fine and adds the <code>foo</code> header.</p>
  
  <p>How does this 4.5.2 code compile! There are no local references to System.Web checked into the source being built and there is nothing being pulled in through a nuget package or such.</p>