Bug 3807 - when active runtime is set to Microsoft .Net and targetting 4.0 it runs XSP2 instead of XSP 4 and looks in the .Net 2.0 GAC folder when debugging.
Summary: when active runtime is set to Microsoft .Net and targetting 4.0 it runs XSP2 ...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 2.8.6
Hardware: PC Windows
: Low normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-08 02:48 UTC by Simon
Modified: 2012-10-22 18:01 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Web.config (1.00 KB, application/xml)
2012-03-08 02:48 UTC, Simon
Details
Project file (3.08 KB, text/plain)
2012-03-08 02:51 UTC, Simon
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Simon 2012-03-08 02:48:48 UTC
Created attachment 1483 [details]
Web.config

On windows platform under XP the debugger loads MSCORLIB.DLL from the .Net 2 GAC at location c:windows\assembly, instead of the new GAC location for .Net 4 ie C:\WINDOWS\Microsoft.NET\assembly.

I have the following options set:
1. the web project is set to target Mono/.Net 4.0 ie BUILD-->General.
2. The active runtime is set to Project-->Active Runtime--> Microsoft .Net.

I have .Net 4 of the FW installed.  MS Visual Web developer Express has not issues targting and running on .Net 4.

Here is the log from the application output window:

Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Started Thread 5496
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\TestWeb\TestWeb\TestWeb\

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 1456
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\TestWeb\TestWeb\TestWeb

Started Thread 4816
Listening on port: 8080 (non-secure)

Started Thread 5152
Started Thread 4640
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'



Finally, I will upload my project file and web.config also.  Note also that when I choose to target the Mono Runtime it works ok without error.

Many thanks

Simon K
Comment 1 Simon 2012-03-08 02:51:38 UTC
Created attachment 1484 [details]
Project file
Comment 2 Simon 2012-03-08 02:56:45 UTC
Sorry should have added this also, this results in an error:


Exception Details: System.BadImageFormatException: Could not load file or assembly 'TestWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

=== Pre-bind state information ===
LOG: User = YOUR-727A0A4E7C\Simon
LOG: DisplayName = TestWeb
 (Partial)
LOG: Appbase = file:///C:/Documents and Settings/Simon/My Documents/MyWebApps/TestWeb/TestWeb/TestWeb/
LOG: Initial PrivatePath = C:\Documents and Settings\Simon\My Documents\MyWebApps\TestWeb\TestWeb\TestWeb\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\TestWeb\TestWeb\TestWeb\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/40ad7138/77e0d6fb/TestWeb.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Simon/Local Settings/Temp/Temporary ASP.NET Files/root/40ad7138/77e0d6fb/TestWeb/TestWeb.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Simon/My Documents/MyWebApps/TestWeb/TestWeb/TestWeb/bin/TestWeb.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
Comment 3 Jeffrey Stedfast 2012-10-22 14:06:19 UTC

*** This bug has been marked as a duplicate of bug 4192 ***
Comment 4 Jeffrey Stedfast 2012-10-22 18:00:29 UTC
oops, this isn't a duplicate
Comment 5 Jeffrey Stedfast 2012-10-22 18:00:45 UTC
this bug is now fixed in git master
Comment 6 Jeffrey Stedfast 2012-10-22 18:01:11 UTC
(should be in 3.0.6)