gimbup
gimbup

Reputation: 336

How to disable creating .sbr and .bsc in Visual Studio C++ Project?

I have Below Settings, but my project still creates .sbr and .bsc file.

enter image description here

What could be the reason? How can I disable creating those files?

Upvotes: 3

Views: 3109

Answers (4)

Colin Ward
Colin Ward

Reputation: 571

I'll post this solution here even though this post is old, as it's not mentioned in the post.

I found that once you enable the .bsc file generation, it's on forever. Even setting it to false doesn't stop its generation. If you have the following line in your .vcxproj file:

<BrowseInformation>false</BrowseInformation>

Then the file is still generated! The only way to stop it is to manually edit your .vcxproj file and delete this line (which is quite safe to do).

It worked for me; perhaps someone else Googling this problem will find this helpful.

Upvotes: 0

Bernhard Leichtle
Bernhard Leichtle

Reputation: 181

Today I learned my lesson on VS ... each cpp file has his own properties in the project file. ... and its possible to configure the project to no browseinformation and enable the option at file-level

Solution for my BSCMAKE error was to disable the option in the project (already done) AND to set the option for each cpp file in the project to "no" .. could be done manually or with search and replace in the vcxproj file.

Upvotes: 1

Murmanfurt
Murmanfurt

Reputation: 36

If you did all of what Helder Magalhães wrote and VS still creates .sbr and .bsc files then you have to check all source files in the project, because they can have that setting for them individually (as I found out):

  • Open each source file's Property Pages dialog box.
  • Click the C/C++ folder.
  • Click the Browse Information property page.
  • Modify the Browse Information File
  • or Disable Browse Information property.

Upvotes: 2

Helder Magalh&#227;es
Helder Magalh&#227;es

Reputation: 616

As there are several ways of enabling the feature, more awkward ones need to be checked also:

  • Enable Browse Information may be set in another configuration
    • By default it's (was) only set in Debug but I've seen some projects setting in Release also
    • The Configuration selector is in the property pages, above the part in the (question's) screenshot
    • One may wish to run through available configurations (to find the potential guilty) and then use the All Configurations to set all at once
  • Additional Options can be appended to the ones configurable in the GUI
    • Check Configuration Properties, C/C++, Command Line, Additional Options for compiler options /FR or /Fr
  • Your project may be creating the browse information in a custom action
    • Check Build Events for custom cl or bscmake commands

Upvotes: 2

Related Questions