views:

110

answers:

1

I have an application that uses SMO to manage databases. It works great on XP and Server 2003. However, when I try to run it on Windows 7, I get the following exception:

Restore failed for Server 'localhost'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

Is this a UAC/permissions issue? Windows 7 is the only variable between the two computers. Database used is Sql Server 2005 on both machines as well. Using .NET 3.5.

Thanks.

+1  A: 

This issue had to do with the fact this dll is not installed on x64 Windows. To resolve it, I had to download SQL Server feature pack: SQL Server Feature Pack.

laconicdev