[MonoDevelop] Problem debugging monodevelop 2.8 on windows with .net 4 runtime
Simon Kelso
swkelso at hotmail.co.uk
Sun Mar 4 00:57:07 UTC 2012
Guys
I am new to monodevelop and have a problem on the 2.8 version on windows where it appears to be loading the .Net 2 runtime instead of the new .Net 4 runtime. I have a test project and have set the default runtime in Tools-->options-->preferences-->runtimes to Microsoft .Net, and set at project level the default under BUILD-->General-->Target Framework to 'Mono / .Net 4.0).
I have the .Net FW 4.0 installed, along with the windows SDK 7 for .Net, and the other pre-requisits for Monodevelp. I had .Net 2 of the FW installed, and have installed version 4.0 of the .Net FW. Never installed 3 or 3.5 as I think .Net 4 is standalone.
My solution runs ok however when I debug/F5 I get the following:
Could not load file or assembly 'TestMono' or one of its
dependencies. This assembly is built by a runtime newer than the
currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.BadImageFormatException:
Could not load file or assembly 'TestMono' or one of its dependencies.
This assembly is built by a runtime newer than the currently loaded
runtime and cannot be loaded.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'TestMono' could not be loaded.
=== Pre-bind state information ===
LOG: User = YOUR-727A0A4E7C\Simon
LOG: DisplayName = TestMono
(Partial)
LOG: Appbase = file:///C:/Documents and Settings/Simon/My Documents/MyWebApps/TestMono/TestMono/
LOG: Initial PrivatePath = C:\Documents and Settings\Simon\My Documents\MyWebApps\TestMono\TestMono\bin
Calling assembly : System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Simon\My Documents\MyWebApps\TestMono\TestMono\web.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\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:/Documents and Settings/Simon/Local Settings/Temp/Temporary ASP.NET Files/root/7085d799/2ebe78b1/TestMono.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Simon/Local Settings/Temp/Temporary ASP.NET Files/root/7085d799/2ebe78b1/TestMono/TestMono.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Simon/My Documents/MyWebApps/TestMono/TestMono/bin/TestMono.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
It appears that it is trying to load the .Net 2 runtime instead of the .Net 4.0 runtime. Do you have any ideas why this would be?
The output window contains the following:
Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Started Thread 2176
Loaded Module 'C:\Program Files\MonoDevelop\bin\xsp2.exe'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\MonoDevelop.Xsp\2.8.0.0__0738eb9f132ed756\MonoDevelop.Xsp.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
Adding applications '/:.'...
Registering application:
Host: any
Port: any
Virtual path: /
Physical path: C:\Documents and Settings\Simon\My Documents\MyWebApps\TestMono\TestMono\
Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
Started Thread 2872
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\MonoDevelop.Xsp\2.8.0.0__0738eb9f132ed756\MonoDevelop.Xsp.dll'
MonoDevelop.Xsp
Listening on address: 127.0.0.1
Root directory: C:\Documents and Settings\Simon\My Documents\MyWebApps\TestMono\TestMono
Started Thread 4052
Listening on port: 8080 (non-secure)
Started Thread 2932
Started Thread 2404
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'
Many thanks
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20120304/09c19f16/attachment.html>
More information about the Monodevelop-list
mailing list