title: Unable to download Microsoft.SqlServer.BatchParser
body: <p>I recently upgraded my system to Windows 7 64 bit from Windows XP. I had a C# application which loads and runs a stored procedure on one of my database server. This was successfully running on Windows XP with VS.NET 2005 32 bit, SQL Server 2005 Client SDK and server running on SQL Server 2005. </p>
  
  <p>After upgrading, the program is failing at the <code>ExecuteNonQuery</code> method below:</p>
  
  <pre><code>    Server server = new Server(new ServerConnection(conn));
      server.ConnectionContext.ExecuteNonQuery(script);
  </code></pre>
  
  <p>The following exception has been logged:</p>
  
  <pre><code>LOG: This bind starts in default load context.
  LOG: No application configuration file found.
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
  LOG: Post-policy reference: Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
  LOG: Attempting download of new URL file:///C:/../Microsoft.SqlServer.BatchParser.DLL.
  LOG: Attempting download of new URL file:///C:/../Debug/Microsoft.SqlServer.BatchParser/Microsoft.SqlServer.BatchParser.DLL.
  LOG: Attempting download of new URL file:///C:/../Microsoft.SqlServer.BatchParser.EXE.
  LOG: Attempting download of new URL file:///C:/../Microsoft.SqlServer.BatchParser/Microsoft.SqlServer.BatchParser.EXE.
  </code></pre>
  
  <p>I did some research and found these links, which don't seem to quite answer my problem: </p>
  
  <blockquote>
    <ol>
    <li><p><a href="http://social.msdn.microsoft.com/Forums/en/sqlsmoanddmo/thread/4b3bfde7-9ef5-42f5-8aa4-0e4612fc4901" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en/sqlsmoanddmo/thread/4b3bfde7-9ef5-42f5-8aa4-0e4612fc4901</a></p></li>
    <li><p><a href="https://stackoverflow.com/questions/3981027/cant-find-microsoft-sqlserver-batchparser-dll">Can&#39;t find microsoft.sqlserver.batchparser.dll</a></p></li>
    </ol>
  </blockquote>
  
  <p>Have any of you encountered similar issue before?</p>