Last post Mar 07, 2014 04:48 AM by Starain chen - MSFT
Mar 06, 2014 01:40 PM|ctheriault|LINK
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 server which runs the same project compiled with VS2008)
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
I also enabled the Assembly Load Trace:
=== Pre-bind state information ===
LOG: User = IIS APPPOOL\DefaultAppPool
LOG: DisplayName = Microsoft.SqlServer.BatchParser
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.
Mar 06, 2014 03:32 PM|ctheriault|LINK
I finally made the application work with some cleanup (explained below), but I still don't understand why this cleanup wasn't necessary when compiled from VS2008 and not with VS2010 involving exactly the same code / libraries / dll /......
The fix explained (I mean the coward "escape" to avoid the problem):
To me this does not explain the problem, therefore I leave this thread unanswered...
Mar 07, 2014 04:48 AM|Starain chen - MSFT|LINK
In my opinion, some old compiled files are not compatible for the VS2010. So, you should clean and recompile it.
There is a link may benefit you:
# What's New in Visual Studio 2010