title: Office PIA Visual Studio 2010 References
body: <p>When I reference any Office 12 PIA from Visual Studio in the project file XML the reference points to Office 14 despite the fact that when you view the properties of the reference in Visual Studio it claims the path is to the Office 12 PIA as shown in the 'HintPath' in the XML below and in the screenshot.</p>
  
  <p>Can someone please explain this behaviour? Is this binding redirection? </p>
  
  <p>I am guessing this is because I have the Office 14 PIA's in the GAC so Visual Studio uses the latest version of the assembly. What are the implications of keeping the references as is and deploying the application to a target machine that does not have the Office 14 PIA's? Will the application use the Office 12 PIA's? </p>
  
  <p>If I am targeting the Office 12 environment and the application is automatically redirecting to Office 14 should I be concerned that the code will cease to function when the Office 14 PIA's are used?</p>
  
  <pre><code>&lt;Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;EmbedInteropTypes&gt;True&lt;/EmbedInteropTypes&gt;
    &lt;HintPath&gt;..\..\..\..\Program Files\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.Office.Interop.Excel.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EUnh7.jpg" alt="PIA Reference"></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/15s06t57.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/15s06t57.aspx</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.80).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.80).aspx</a></p>
  
  <blockquote>
    <p>When you install and register the Office PIAs in the global assembly cache (either with Office or by installing the redistributable package for the PIAs), the binding redirect assemblies are also installed only in the global assembly cache. These assemblies help make sure that the correct version of the primary interop assemblies are loaded at run time. For example, when a solution that references a 2007 Microsoft Office primary interop assembly runs on a computer that has the Microsoft Office 2010 version of the same primary interop assembly, the binding redirect assembly instructs the .NET Framework runtime to load the Microsoft Office 2010 version of the primary interop assembly.</p>
  </blockquote>