0

Visual Studio can jump to the symbol definition when press F12 over a symbol. Can I modify this behavior so the symbol resolving can be customized? For example, can we reference some other rule files to resolve the symbol.

I want to do this because my project has some special linking rules which decides which symbols get linked. But Visual Studio cannot follow such rule files by default.

For example, I have 4 C projects in a solution:

  • project 1: defines functionX().
  • project 2: also defines a functionX() with the same name and signature. But the implentation is different.
  • project 3: invokes functionX() but its rule file mandates that the linked implementation comes from project 1.
  • project 4: also invokes functionX() but its rule file mandates that the linked implementation comes from project 2.

Currently, when I press F12 on functionX() in project 3/4, Visual Studio just lets me choose between implentations from project 1/2. I want to avoid this tedious manual selection by bringing in the rule files as a reference.

Is such customization possible?

smwikipedia
  • 61,609
  • 92
  • 309
  • 482
  • 1
    if you want to achieve it by using visual studio extension, please refer to the following thread: https://stackoverflow.com/questions/22344868/how-can-i-perform-go-to-definition-programmatically-in-visual-studio – Zhanglong Wu - MSFT May 24 '17 at 08:52
  • @ColeWu-MSFT It looks promising. I will take a look. Thanks. – smwikipedia May 24 '17 at 09:05

1 Answers1

-1

There are many [extension types][1] I can do with Visual Studio. What interests me most is the [Visual Studio-based application][2].

I will put my findings at below thread as my search goes on.

How to add C/C++ language service to a Visual Studio-based application?

smwikipedia
  • 61,609
  • 92
  • 309
  • 482