Current debbuger framework configuration - debugging

Somenone knows why I get this message when I'm debugging an attached ASP.NET 2.0 application ?
An unhandled exception was raised from Microsoft .NET Framework v1.0, 1.1, or 2.0, but the current debugger is configured to debug Microsoft .NET Framework v4.0 code. Examine the exception using the SOS tool.
I have .NET 4.0 installed, the application are running in a a IIS7.

Assuming that you are using visual studio 2010
When attaching to the process for debugging you should select the type of code:
The default is managed (v4.0) code
Other options are:
Managed (v2.0, v1.1, v1.0)
Native
Script
SilverLight
T-SQL
workflow

When you've attached to your debugger, you need to check the right framework version. For example, click Debug -> Attach to Process and it will bring up the Attach to Process window. It should have a Select button to select the type of code to debug. Select the Managed (v2.0, v1.1, v1.0) code option and then attach to the process you want to debug.

Related

Unable to open designer for DevExpress version 8.2 in Visual Studio

I've inherited an old project which uses Devexpress 8.2.4 - so i went and installed an appropriate DXperience Subscription v8.2.4. Now, when I try to open the designer through Visual Studio 2019, I get a:
"This method explicitly uses CM policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40/LegacySecurtyPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information."
Then I tried to open the project in VS 2010, and upon attempt at opening the designer, same CAS policy error happens.
After editing the VS2010 DevEnv configuration file (and respective config file for VS 2019), as Thomas suggested in his answer here, my Visual Studio 2019 just started crashing during start, and my Visual Studio 2010 successfully started but it then crashed upon trying to select the designer object.
Yes, I'm trying to get this designer for Devexpress 8.2 to run in either IDE - I just need to get it to work so I can hopefully add a QR Code(is this even possible in v8.2.4???).
I just don't know how to access designer to actually graphically update the report. I did some Devexpress projects myself but using v19 and newer, but I'm having trouble now, opening this designer for old Devexpress 8.21.
Any help would be appreciated as this HAS to be done by tomorrow.
Also, if v8.2.4 doesn't support QR Code (an XRBarCode object), what would be an alternative for adding that QR Code functionality? Would I have to upgrade to newer versions - would that break something?
Thanks!

I recently updated to Visual Studio 16.5.0 Preview 2.0 and I'm getting a fatal error when debugging an Azure Function project

I recently updated to Visual Studio 16.5.0 Preview 2.0 and I'm getting the following error.
I'm trying to debug a project for an Azure Function. Has anyone encountered this before?
A fatal error has occurred and debugging needs to be terminated. The
debugger was configured to use the desktop CLR (.NET FRAMEWORK)
Managed debugger, but the target process loaded the CoreCLR (.NET
CORE) runtime. To debug this project, configure it to use the 'Managed
(CoreCLR)' debugger.
Here is a similar issue about this.
Please try follow the steps to configure it to use the 'Managed (CoreCLR)' debugger.
In Visual studio -> Debug menu -> Attach to Process -> in "Attach to" field, click the "select" button -> then in the "Debug those code types", select "Managed (CoreCLR)".
The screenshot as below:

Unable to debug MVC source code in Visual Studio 2010

I'm trying to debug MVC source code in Visual Studio 2010 using the Microsoft Symbols Server. I've configured Debugging options as seen below:
and my project is targeting .NET Framework 4.0. (as said in Debug .NET Framework's source code only shows disassembly in Visual Studio 2010)
When I try to load the symbols of System.Web.MVC.dll, some window pops up saying that they're being loaded. But in the end, the Modules window says they couldn't be found, call stack lines are still grayed out and I only get code from disassembly window.
Anyone knows what is happening?
Microsoft has not provided symbols/source code for the entire .NET framework via their symbol server. However MVC is opened source so you can seperately download the MVC source from Microsoft: http://aspnet.codeplex.com/releases/view/58781

Issues debugging Moles

I’m using visual studio 2008 and moles version 0.93. Everything works well except when I try to debug any test that uses a Moled type. The test skips all my breakpoints. And I get the following message in the output window:
Unable to attach. Check for one of the following.
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect
Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.
If I try debbuger.Break () I get a message: "No symbols are loaded for any call stack frame. The source code cannot be displayed."
I’m in a crunch right now chasing an issue with one our main components and it has been a pain (like I need novocaine) trying to figure anything out without being able to step through the code.
I want to take advantage of mole's "smooth debugging experience". However, I can't seem to get the debugger to attach at all.
Thanks,
Bzz
See the solution to this issue here:
http://social.msdn.microsoft.com/Forums/en/pex/thread/91c08bf4-3260-458c-a221-91f030a75499
I had this problem when I moved a project from Visual Studio 2010 to Visual Studio 2008. Here's what I did to fix it.
Close Visual Studio. Navigate to the Debug/bin location. Delete the following files:
*.vshost.exe
*.vshost.exe.config
*.vshost.exe.manifest
Open the solution. Goto the project Settings. Under the Application Target Framework, select a framework lower than the one you are working with (you'll set it back later). Visual Studio will close and re-open your project automatically. Then set the Target Framework back to the original version you were working with. Rebuild all, and debugging will work properly.

Visual Studio 2010 won't allow me to debug web application

I have the .NET Target framework set to .NET Framework 3.5
When I try to debug with f5, i get the following message in a popup window:
"Unable to start debugging on the web server. Mixed-mode debugging of x64 processes is not supported when using Microsoft.NET Framework versions earlier than 4.0."
Of course when I set the target framework to .NET 4.0 it works fine. However my web server only supports up to 3.5 so I have to try and make this work with 3.5.
The closest match to a googled solution is found here:
http://msdn.microsoft.com/en-us/library/dd409790.aspx
however when I try to follow the steps to change the platform to x86, the setting it tells me to change simply isn't there. The closest thing is project properties -> Build -> Platform target, and that doesn't fix the problem.
What am I doing wrong?
THANK YOU FOR YOUR TIME
What you need to do is disable mix-mode debugging. That is simultaneously debugging native and managed code. That is what's causing the issue here.
Right click on the startup project and select properties
Go to the Debug tab
Uncheck the box which says "Enabled unmanaged code debugging"

Resources