Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

VS2008 to VS2010: Could not load file or assembly 'Microsoft.SqlServer.BatchParser' or one of its dependencies. An attempt was made to load a program with an incorrect format.

$
0
0

I have a issue to upgrade a web project from VS2008 to VS2010.

The deployed VS2008 appl. is up and running since 2009...

I succesfully converted the project and everything works fine on my development computer.

The trouble begins after I deployed the project on the target server (the same serverwhich runs the same project compiled with VS2008)

  • Windows Server 2008r2 64bits
  • SQL-Server R2
  • IIS:    Version Information: Microsoft .NET Framework Version:2.0.50727.5477; ASP.NET Version:2.0.50727.5479

In order to minimize the changes, I did not yet change the target framework to .NET 4 for any projects / libraries.

When starting the deployed application on the target server, I get the following message:

Could not load file or assembly 'Microsoft.SqlServer.BatchParser' or one of its dependencies. An attempt was made to load a program with an incorrect format.

 I already ensured "SharedManagementObjects_amd64.msi" has been installed; anyway the correct BatchParser DLL must have there before, since the web-appl compiled with VS2008 is running okay for 5 years on the same computer! I don't see how VS2010 can screw it up...

I also enabled the Assembly Load Trace:

=== Pre-bind state information ===
LOG: User = IIS APPPOOL\DefaultAppPool
LOG: DisplayName = Microsoft.SqlServer.BatchParser
(Partial)
LOG: Appbase = file:///C:/webapp/order/
LOG: Initial PrivatePath = C:\webapp\order\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\webapp\order\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/order/35d7d198/88f82bf2/Microsoft.SqlServer.BatchParser.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/order/35d7d198/88f82bf2/Microsoft.SqlServer.BatchParser/Microsoft.SqlServer.BatchParser.DLL.
LOG: Attempting download of new URL file:///C:/webapp/order/bin/Microsoft.SqlServer.BatchParser.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
                  

The correct BatchParser DLL is in my web appl "bin" directory! Its version is also the same on my dev computer (2005.90.5000.0 - date modified: 14/01/2013 8:21 AM - 351 KB)

It looks like a stupid configuration issue... but I'm really stuck.

Any suggestion?


Viewing all articles
Browse latest Browse all 3509

Trending Articles