2

Selecting any class, property or variable and pressing

Ctrl+`

doesn't add it to Code Map. Also Show on Code Map option is not available on the "right-click" menu.

I am able to generate Code Map for the Solution or make a blank Code Map, but I am not able to add any code to it.

Is it not implemented yet in the preview or am I missing something?

Edit: doesn't work in vNext projects.

Alkasai
  • 3,757
  • 1
  • 19
  • 25

1 Answers1

3

CodeMap is working fine in the final version of VS 2015 RTM.

Please note that at the time of the VS 2015 RTM release - ASP.NET VNext was in "preview mode" and was not supported by Code Map. So you won't get "Show on Code Map" menu items in Solution Explorer or in the editor for these projects.

Most other C# VB and C++ projects that produce assemblies are supported by CodeMap.

Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74
  • 1
    Not really. The option is still not there when you right-click on a method or a class. You can debug using the Code Map, or you can build a Code Map for a solution, but you can't simply add a class to the map. – Alkasai Aug 10 '15 at 20:51
  • On what language are you using Code Map? – Bogdan Gavril MSFT Aug 11 '15 at 14:29
  • I'm trying to use it on C#. – Alkasai Aug 11 '15 at 14:31
  • I assume you are using the Enterprise edition of VS, not Professional or Community? – Bogdan Gavril MSFT Aug 11 '15 at 16:00
  • If you right click in Solution Explorer on a file in a C# project, does "Show on Code Map" appear? – Bogdan Gavril MSFT Aug 11 '15 at 16:05
  • That's correct. I use an Enterprise edition and no "Show on Code Map" doesn't appear. It only appears when I right-click solution or a project, but not a file or a class. – Alkasai Aug 11 '15 at 20:45
  • Hmm, sounds like one of components of Code Map doesn't load, namely the component that interacts with managed code. Let's try this - open a developer command prompt and type "devenv /setup" - this will clean the cache of loaded components. Note that it will take a few minutes for that cache to be rebuilt. – Bogdan Gavril MSFT Aug 12 '15 at 15:17
  • Are you able to right-click on C# class and add it to a code map, in VS2015 Enterprise? – Alkasai Aug 12 '15 at 15:25
  • Hi Alkasai. Yes, I am able to do that - right click > show on code map is present from both the editor and from Solution Explorer. I should also disclose that I am a developer on Code Map. – Bogdan Gavril MSFT Aug 12 '15 at 18:16
  • lol, you probably know what you're talking about. I run the `devenv /setup` command, but nothing seemed to have changed. [This is what I see when I right-click on class name in the editor.](http://imgur.com/k33SD2d) – Alkasai Aug 13 '15 at 15:40
  • This may be a bug in the upgrade from CTP to RTM. It may be that the Roslyn / CodeAnalysis assemblies are out of date. I would suggest uninstalling VS 2015, deleting the directory from program files, and also from %appdata% and then reinstalling VS 2015 RTM again. – Bogdan Gavril MSFT Aug 17 '15 at 15:05
  • This is a clean install of both Windows 10 an VS 2015 RTM – Alkasai Aug 17 '15 at 18:52
  • I just realised that it doesn't work only in vNext projects. It works fine in WPF project or a Console App. – Alkasai Aug 22 '15 at 15:58
  • 1
    Ah, that explains it! ASP vnext is in preview mode and they have customized the project system significantly so Code Map doesn't work with it at this time, at least not until they get nearer to a stable version. – Bogdan Gavril MSFT Aug 24 '15 at 08:13
  • I see.. updated my question. Please update your answer and I'll accept it. Thank you. – Alkasai Aug 24 '15 at 21:02