1

Closed

System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

description

Hi.
 
I create a Visual Studio 2008 web application that hosts an asmx web service targeting .net 3.5 and x86 platform.
 
Trying to use it as input to WSDLGenerator.exe causes the following exception:
 
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at WSDLGeneratorCmd.Program.Main(String[] commandArgs)
 
=== Pre-bind state information ===
LOG: User = Domain\Username
LOG: DisplayName = System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified)
LOG: Appbase = file:///C:/WSDLGenerator/WSDLGenerator-56547/WSDLGeneratorSolution/WSDLGenerator/bin/Debug/
LOG: Initial PrivatePath = NULL

Calling assembly : WSDLGenerator, Version=0.0.0.6, Culture=neutral, PublicKeyToken=null.

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: System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
 
Here is the command line I am using:
WSDLGenerator.exe-i "C:\MyWebApp\bin\MyWebApp.dll" -o "C:\MyConsoleApp\Service References\MyWebAppWebService" -w -v
 
I am running on Windows 7 x64 Ultimate.
 
Any ideas?
 
Thank you.
Closed Feb 19, 2012 at 8:25 AM by stefh
Issue is solvd as described.

comments

icnocop wrote Dec 1, 2010 at 12:22 AM

I found out that if the dll targets the "Any CPU" platform instead, then WSDLGenerator does not fail when Assembly.LoadFile(path) is called.

stefh wrote Mar 15, 2011 at 12:43 PM

Maybe you need to install .NET 4.0 ?

wrote Feb 19, 2012 at 8:25 AM

wrote Feb 14, 2013 at 1:46 AM

wrote May 16, 2013 at 8:18 AM