12

(VS 2008) I'm using a C# library for my VB.NET project. And the method summary/notes or what they are called do not show in intellisense. Is this supposed to be like that? Or is there something I must do to fix it? And if not, will VS 2010 be able to do this?

EDIT: Still unresolved. Now building library dll + xml file, but how to import the xml file in my vb project? See image: http://i52.tinypic.com/25kh5xw.png

bretddog
  • 5,411
  • 11
  • 63
  • 111
  • 1
    Have you added the correct references? Have you made sure to import the correct namespaces? – Oded Dec 19 '10 at 11:06
  • 2
    Have you (or are you able to) confirmed that the C# library code actually has XML comments that document each function? That's where the Intellisense gets its method summaries/notes. – Cody Gray - on strike Dec 19 '10 at 11:09
  • cheers! Yes I'm importing the correct namespace, and using it successfully. The library does have summary comments (I have the source code and can build it), but as commented to answer below, the XML file generation was NOT checked. So now I've generate XML file, but not sure how to import this xml..? – bretddog Dec 19 '10 at 11:41

3 Answers3

26

In C# library, go to the properties on the build tab, and check the checkbox for including XML documentation and specify the name and path. After that include the new library in your VB.Net project.

Hps
  • 1,177
  • 8
  • 9
  • Also, it looks similar to http://stackoverflow.com/questions/1329338/xml-comments-not-showing-on-vb-net – Hps Dec 19 '10 at 11:11
  • 1
    Thanks! This generated an xml file in addition to the dll (in library release folder). But do I need to add reference to this xml file also in addition to the dll? Because I tried to delete reference to dll and add it again, but that didn't help. And in "Add Reference" dialog it seems not to be possible to select an xml file.. I'm using the "Browse tab" to find the dll.. Should I do it differently? http://i52.tinypic.com/25kh5xw.png – bretddog Dec 19 '10 at 11:30
  • Oh, thought it was a path field. Well well.. Now it works. :) – bretddog Dec 19 '10 at 14:46
  • 1
    I had to restart Visual Studio after those steps to actually see the comments. – BornToCode Jan 20 '16 at 14:46
1

one reason could be resolved by importing the namespace needed

another reason could be due to faulty writing

if you send the code where the problem is we might be able to help you

Mohamed Kamal
  • 2,377
  • 5
  • 32
  • 47
  • Can't see this to be a problem, as I'm using the library successfully. It's just missing the intellisense of summary/remarks. Not sure what code I can post, it seems to be an issue with the reference to xml, but don't know how to add it. – bretddog Dec 19 '10 at 13:10
0

If you're using source control (TFS or Github) then you need to the following:

  • Check in ( Push) for safe return point (base line)
  • Delete the references from the project.
  • Delete the custom dll's from the solution.

At this point the libs are marked as [removed], if you would add them again at this point, they will just be marked as [changed] again. This did not include the summaries for me.

  • Check in (push). dll's are now removed from source control as well.
  • Drag and drop the dll's (including xml) into the solution (I recommend using this method for including dll's
  • Add references to these dll's via Browse.
  • Check if you have summaries.
  • Check in (push).
Community
  • 1
  • 1
CularBytes
  • 9,924
  • 8
  • 76
  • 101