While I was writing my code in Visual Studio 2015CTP I got error as below in ErrorList window:
Error CS0117 'Console' does not contain a definition for 'ReadKey'
By clicking on CS0117
it redirects me to default browser and searches using Bing. As most of the time we use Google as a search engine, is there any way to make Google as a default search instead of Bing.
Go to: Tools -> Option -> Text Editor -> C/C++ -> Advanced -> IntelliSense -> Search Provider -> then change "bing" to "google".
You can change this behavior by going to Tools -> Options -> Projects and Solutions -> General and deselecting the "Always show Error List if build finishes with errors".
To display the Error List, choose View > Error List, or press Ctrl+\+E.
Simply redirecting the search provider probably won’t work. We generate a search string that is tailored to work with a specialized search engine on the Bing side. Passing that same search string to another search engine probably will give poor results.
What you will need to do, instead, is define your own handler for the help event. This would extract relevant information from the error itself (such as error code, language, etc.) to create a generic search that would work with the provider of your choice. If this handler comes before the default handler, then you can handle the event and prevent the default (bing) search from executing.
The interfaces your need to implement are:
ITableControlEventProcessorProvider
This is a MEF export and should have the following attributes:
[Export(typeof(ITableControlEventProcessorProvider))]
[DataSourceType(StandardTableDataSources.ErrorTableDataSourceString)]
[DataSource(StandardTableDataSources.AnyDataSourceString)]
[ManagerIdentifier(StandardTables.ErrorsTableString)]
[Name("my custom event processor name")]
[Order(Before=Priority.Default)]
ITableControlEventProcessor
It is probably best to define a class that is derived from
TableControlEventProcessorBase
(which provides default/no-op implementations for all of the events) and then explicitly handle the PreprocessNavigateToHelp(ITableEntryHandle entry, TableEntryEventArgs e)
event by:
e.Handled
to true (to prevent the other help handlers from executing).There’s no built-in support for switching the search engine used. It is, however, possible to create an extension that lets Google (and other) search engines be linked to instead, just as the Bing Developer Assistant extension did in previous releases of Visual Studio.
I'd point you to the docs with info on how to create such an extension, but they're not published yet. They're on the list of docs to be published around the time Visual Studio 2015 is officially released.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With