Microsoft KB Archive/318367

From BetaArchive Wiki
Knowledge Base


Article ID: 318367

Article Last Modified on 7/29/2005



APPLIES TO

  • Microsoft Visual C++ .NET 2002 Standard Edition
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Academic Edition



This article was previously published under Q318367

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SYMPTOMS

When you try to step into the ATL, CRT, or MFC source code files while debugging a project, you receive the following error message:

There is no source code available for the current location.

CAUSE

In the current Solution, the Debug Source Files paths are not set correctly, which can occur if the following registry key is missing the Source Directories value or if the current user does not have permissions to write to the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0


RESOLUTION

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
To resolve this problem, do one of the following:

  • Use the Registry Editor to give users write permissions to the HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0 registry key.
  • Manually add the directories for the ATL, CRT, and MFC source files.

    NOTE: You must follow these steps for each Solution.
    1. In the Solution Explorer, right-click the Solution, and then click Properties.
    2. Expand the Common Properties folder, and then click Debug Source Files.
    3. In the Search these paths for sources files list box, add the full path to the folders in which the debugger will locate source files. The following are the default paths for the ATL, CRT, and MFC source files, where Drivename is the drive on which Visual Studio .NET is installed:

      Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\crt\

      Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\mfc\

      Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\atl\


STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual C++ .NET 2003 and in Microsoft Visual Studio .NET 2003.

MORE INFORMATION

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
The same behavior occurs in the Microsoft Visual Studio .NET Trial Edition, regardless of the user permissions for the registry key. To resolve the problem, follow these steps:

  1. Start Registry Editor (Regedt32.exe).
  2. Click the following key in the registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0

  3. On the Edit menu, click New, and then click String Value. Add the following registry value, where Drivename is the drive where Visual Studio .NET is installed:

    Value Name: Source Directories
    Value Data: Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\crt\;Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\mfc\; Drivename:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\atl\

    Make sure that you use the path where Visual Studio .NET is installed.
  4. Close Registry Editor.

NOTE: The Microsoft Visual Studio .NET Trial Edition is not a supported product. The information in this article is provided as-is and is subject to change without notice. No formal product support is available from Microsoft for this Trial Edition product.

Keywords: kbbug kbfix kbide kbdebug kbpending kbvs2002sp1sweep KB318367