Редактиране

Споделяне чрез


Building Browse Information Files: Overview

Warning

Although BSCMAKE is still installed with Visual Studio, it's no longer used by the IDE. Since Visual Studio 2008, browse and symbol information is stored automatically in a SQL Server .sdf file in the solution folder.

To create browse information for symbol browsing, the compiler creates an .sbr file for each source file in your project, then BSCMAKE.EXE concatenates the .sbr files into one .bsc file.

Generating .sbr and .bsc files takes time, so Visual Studio turns off these functions by default. If you want to browse current information, you must turn on the browse options and build your project again.

Use /FR or /Fr to tell the compiler to create .sbr files. To create .bsc files, you can call BSCMAKE from the command line. Using BSCMAKE from the command line gives you more precise control over the manipulation of browse information files. For more information, see BSCMAKE reference.

Tip

You can turn on .sbr file generation but leave .bsc file generation turned off. This provides fast builds but also enables you to create a fresh .bsc file quickly by turning on .bsc file generation and building the project.

You can reduce the time, memory, and disk space required to build a .bsc file by reducing the size of the .bsc file.

See General Property Page (Project) for information on how to build a browser file in the development environment.

To create a smaller .bsc file

  1. Use BSCMAKE command-line options to exclude information from the browse information file.

  2. Omit local symbols in one or more .sbr files when compiling or assembling.

  3. If an object file doesn't contain information needed for your current stage of debugging, omit its .sbr file from the BSCMAKE command when you rebuild the browse information file.

To combine the browse information from several projects into one browser file (.bsc)

  1. Either don't build the .bsc file at the project level or use the /n switch to prevent the .sbr files from being truncated.

  2. After all the projects are built, run BSCMAKE with all of the .sbr files as input. Wildcards are accepted. For instance, if you had project directories C:\X, C:\Y, and C:\Z with .sbr files in them and you wanted to combine them all into one .bsc file, then use BSCMAKE C:\X\*.sbr C:\Y\*.sbr C:\Z\*.sbr /o c:\whatever_directory\combined.bsc to build the combined .bsc file.

See also

Additional MSVC build tools
BSCMAKE reference