Share via


Unloading a .Bsc File from a Project

If you build a project outside of the Visual Studio development environment, but use the development environment to perform other project tasks (debugging, for example), you may want to rebuild the .bsc file from the command line while the .bsc is loaded in the development environment. In this case, you need to unload the .bsc file, so it can be rebuilt.

If you attempt to build a project while the .bsc file is being used (locked) by the development, you will get a BK1506 error.

Unloading a .bsc closes the file so it can be rebuilt. The .bsc remains available to the development environment for operations such as Find Symbol, Goto Definition / References or Object Browser. The development environment will automatically reload the .bsc on an as needed basis.

To unload a .bsc file

  • In the Tools menu, select Unload Source Browser File.

or

  • In the command window (select Other Windows from the View menu and then select Command Window), type Tools.UnloadSourceBrowserFiles.

For information on how to more easily access the command to unload a .bsc file, see Adding Accelerator Keys and Key Bindings Anchor.

To remove a .bsc file

  1. If you opened the .bsc file with the Open option on the File menu or through object browser's Customize button, go to the object browser, select the .bsc file, right click, and select Remove.

  2. Enable the Show Miscellaneous files in Solution Explorer (select Options in the Tools menu, then the Documents property page in the Environment folder), right click on the .bsc file, select Remove.

or

  • If the .bsc file is part of the project, select the .bsc file in Solution Explorer and press Delete.

See Also

Other Resources

Using .Bsc Files to Enable Browsing To References of C++ Symbols