views:

28

answers:

1

I have trawled the internet - to no avail. Woe is me.

I have a .Net website running under a .Net framework 4.0 App Pool.

The website references various assemblies that have been compiled for .Net 3.5.

I have ensured that identical versions of the dll's and pdb's are in the bin folder of the the 3.5 code that I am trying to debug, and the reference path of the 4.0 web site. I.e. the code that I am trying to debug matched the assemblies that are loaded into the app pool's process.

When I attach the debugger using VS2008 with the solution for the .Net 3.5 code open, the breakpoints that I have set are marked as invalid (i.e. marked with an exclamation mark). When I hit refresh on a browser page that invokes the code that I am trying to debug, VS2008 raises an unmanaged code exception.

I have researched In-Process Side-by-Side code execution, which is what is occurring in this instance, and is working very well; but for the life of me I cannot find any information on debugging in this scenario.

It is not an option to convert the .Net 3.5 projects to use .Net 4.0, nor is it possible to convert them to use VS2010 and leave them targeting .Net framework 3.5

Any help will be greatly appreciated.

+2  A: 

When an App Pool targets .NET 4.0 this means that your site runs under the CLR 4.0 and the assemblies compiled against .NET 3.5 are loaded in this CLR. VS2008 cannot debug processes running CLR 4.0, only CLR 2.0.

So if you want to debug either change the AppPool CLR to 2.0 or use VS2010 or even better use the Visual Studio's integrated server which you used to develop this site.

Darin Dimitrov