FIX: Breakpoints are not hit when you debug a Visual Studio Add-in project that targets the .NET Framework 2.0 in Microsoft Visual Studio 2010 SP1

Article translations Article translations
Article ID: 2591546 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • In Microsoft Visual Studio 2010 Service Pack 1 (SP1), you create a Visual Studio Add-in project that targets the Microsoft .NET Framework 2.0.
  • You set a breakpoint in the project.
  • You start debugging the project.

In this scenario, the breakpoint that you set is not hit.

Note This problem does not occur when you use the release version of Microsoft Visual Studio 2010.

CAUSE

This problem occurs because Visual Studio treats the add-in as a .NET Framework 2.0-based application. However, the Devenv.exe configuration files force the application to load as a .NET Framework 4.0-based application. Therefore, Visual Studio debugs the application in the wrong runtime, and this causes the breakpoints not to be hit.

RESOLUTION

Important This hotfix is specifically for Visual Studio add-in projects. We do not recommend that you install this hotfix if you use Visual Studio to create Office add-in projects.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio 2010 Service Pack 1 (SP1) installed.

Restart information

You do not have to restart the computer after you apply this hotfix. We recommend that you exit any instances of Visual Studio, its applications, or any .NET Framework applications before you apply this hotfix. Otherwise, you must restart Visual Studio.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Microsoft Visual Studio 2010 Service Pack 1
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Csproj.dll10.0.40219.3532,292,04014-Oct-201120:47x86
Msvbprjd.dll10.0.40219.3534,494,16014-Oct-201120:47x86


WORKAROUND

To work around this problem, use one of the following methods:
  • Target the Visual Studio Add-in project to the Microsoft .NET Framework 4.0 instead of to the Microsoft .NET Framework 2.0.
  • After you create the Visual Studio Add-in project, save the project, and restart Visual Studio to start debugging.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about how to use breakpoints to debug a project, visit the following Microsoft Developer Network (MSDN) website:
Walkthrough: Debugging an Add-in project
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 2591546 - Last Review: November 14, 2011 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio 2010 Service Pack 1, when used with:
    • Microsoft Visual Studio 2010 Premium
    • Microsoft Visual Studio 2010 Professional
    • Microsoft Visual Studio 2010 Ultimate
Keywords: 
kbautohotfix kbqfe kbhotfixserver kbfix kbexpertiseinter kbsurveynew kbbug KB2591546

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com