why don't my comments work?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • suzy

    why don't my comments work?

    Hi,

    I am wondering why my comments do not appear in intellisense.

    I have written the following method:

    /// <summary>
    /// testing
    /// </summary>
    /// <param name="stem">wil l this work?</param>
    public void test(string stem)
    {

    }

    If I compile/build this code, and try to call it, the summary doesn't appear
    in the intellisense. Any idea why?

    Thanks very much.


  • Philip Rieck

    #2
    Re: why don't my comments work?

    Verify that you are moving the XML file created along with your assembly (if
    you are copying myassembly.dll to where you're referencing it, make sure
    you've also copied myassembly.xml )


    "suzy" <me@nospam.co m> wrote in message
    news:%23yy6wml6 DHA.1968@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > Hi,
    >
    > I am wondering why my comments do not appear in intellisense.
    >
    > I have written the following method:
    >
    > /// <summary>
    > /// testing
    > /// </summary>
    > /// <param name="stem">wil l this work?</param>
    > public void test(string stem)
    > {
    >
    > }
    >
    > If I compile/build this code, and try to call it, the summary doesn't[/color]
    appear[color=blue]
    > in the intellisense. Any idea why?
    >
    > Thanks very much.
    >
    >[/color]


    Comment

    • Jon Skeet [C# MVP]

      #3
      Re: why don't my comments work?

      suzy <me@nospam.co m> wrote:[color=blue]
      > I am wondering why my comments do not appear in intellisense.
      >
      > I have written the following method:
      >
      > /// <summary>
      > /// testing
      > /// </summary>
      > /// <param name="stem">wil l this work?</param>
      > public void test(string stem)
      > {
      >
      > }
      >
      > If I compile/build this code, and try to call it, the summary doesn't appear
      > in the intellisense. Any idea why?[/color]

      Do you mean you're using it from a different solution? If so, you need
      to build the XML documentation file and keep that with the assembly.

      --
      Jon Skeet - <skeet@pobox.co m>
      Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

      If replying to the group, please do not mail me too

      Comment

      • suzy

        #4
        Re: why don't my comments work?

        The XML file that is generated is in the bin\Debug folder.

        I haven't moved the assembly anywhere, I am trying to get it working in
        design time. Still no joy. :(

        I am a newbie by the way. :)



        "Philip Rieck" <stuff@mckraken .com> wrote in message
        news:%23SNJIql6 DHA.2392@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > Verify that you are moving the XML file created along with your assembly[/color]
        (if[color=blue]
        > you are copying myassembly.dll to where you're referencing it, make sure
        > you've also copied myassembly.xml )
        >
        >
        > "suzy" <me@nospam.co m> wrote in message
        > news:%23yy6wml6 DHA.1968@TK2MSF TNGP11.phx.gbl. ..[color=green]
        > > Hi,
        > >
        > > I am wondering why my comments do not appear in intellisense.
        > >
        > > I have written the following method:
        > >
        > > /// <summary>
        > > /// testing
        > > /// </summary>
        > > /// <param name="stem">wil l this work?</param>
        > > public void test(string stem)
        > > {
        > >
        > > }
        > >
        > > If I compile/build this code, and try to call it, the summary doesn't[/color]
        > appear[color=green]
        > > in the intellisense. Any idea why?
        > >
        > > Thanks very much.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • suzy

          #5
          Re: why don't my comments work?

          OK I must be really missing something here.

          Jon,

          yes you are right, i am accessing this code from another solution. I tried
          creating a documentation file (which created lots of html files etc in a
          folder called "CodeCommentRep ort". There is no xml file here though).

          I have also tried copying the doc.xml file that was created when I build the
          solution into the same dir as my code files and that didn't work either.

          What do I do from here, because it's still now working.



          "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
          news:MPG.1a89b5 0b616f67cd98a05 9@msnews.micros oft.com...[color=blue]
          > suzy <me@nospam.co m> wrote:[color=green]
          > > I am wondering why my comments do not appear in intellisense.
          > >
          > > I have written the following method:
          > >
          > > /// <summary>
          > > /// testing
          > > /// </summary>
          > > /// <param name="stem">wil l this work?</param>
          > > public void test(string stem)
          > > {
          > >
          > > }
          > >
          > > If I compile/build this code, and try to call it, the summary doesn't[/color][/color]
          appear[color=blue][color=green]
          > > in the intellisense. Any idea why?[/color]
          >
          > Do you mean you're using it from a different solution? If so, you need
          > to build the XML documentation file and keep that with the assembly.
          >
          > --
          > Jon Skeet - <skeet@pobox.co m>
          > http://www.pobox.com/~skeet
          > If replying to the group, please do not mail me too[/color]


          Comment

          • Jon Skeet [C# MVP]

            #6
            Re: why don't my comments work?

            suzy <me@nospam.co m> wrote:[color=blue]
            > yes you are right, i am accessing this code from another solution. I tried
            > creating a documentation file (which created lots of html files etc in a
            > folder called "CodeCommentRep ort". There is no xml file here though).[/color]

            Nope, you don't want to do that. Intellisense is looking for the XML
            file, not HTML.
            [color=blue]
            > I have also tried copying the doc.xml file that was created when I build the
            > solution into the same dir as my code files and that didn't work either.
            >
            > What do I do from here, because it's still now working.[/color]

            You should name the XML file the same as your assembly, but with .xml
            on the end instead of .dll. For instance:

            MyCompany.Foo.d ll and MyCompany.Foo.x ml

            If they're both in the same directory with the naming scheme above,
            VS.NET should pick them up.

            --
            Jon Skeet - <skeet@pobox.co m>
            Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

            If replying to the group, please do not mail me too

            Comment

            • Hans Kesting

              #7
              Re: why don't my comments work?


              "suzy" <me@nospam.co m> wrote in message
              news:O1Vep2l6DH A.3896@TK2MSFTN GP11.phx.gbl...[color=blue]
              > OK I must be really missing something here.
              >
              > Jon,
              >
              > yes you are right, i am accessing this code from another solution. I[/color]
              tried[color=blue]
              > creating a documentation file (which created lots of html files etc in a
              > folder called "CodeCommentRep ort". There is no xml file here though).
              >
              > I have also tried copying the doc.xml file that was created when I build[/color]
              the[color=blue]
              > solution into the same dir as my code files and that didn't work either.
              >
              > What do I do from here, because it's still now working.
              >
              >
              >[/color]

              Just to go over the steps, these work for us:
              1) in the project properties, write a filename for XML documentation
              (Configuration Properties | Build)
              the default name seems to be: same directory/filename as dll,
              except a ".xml" extension instead of ".dll"
              2) REbuild the project to generate/update this XML file,
              no need to generate the documentation html-files.
              (If you just "build" the project then the xml-file is not updated.)
              3) reference this dll in the other project, xml (and pdb) files
              are automatically copied


              Hans Kesting


              Comment

              • suzy

                #8
                Re: why don't my comments work?

                Great Hans,

                Thanks so much, that works (finally!!!)

                :)


                "Hans Kesting" <news.2.hansdk@ spamgourmet.com > wrote in message
                news:uWOo48l6DH A.1556@tk2msftn gp13.phx.gbl...[color=blue]
                >
                > "suzy" <me@nospam.co m> wrote in message
                > news:O1Vep2l6DH A.3896@TK2MSFTN GP11.phx.gbl...[color=green]
                > > OK I must be really missing something here.
                > >
                > > Jon,
                > >
                > > yes you are right, i am accessing this code from another solution. I[/color]
                > tried[color=green]
                > > creating a documentation file (which created lots of html files etc in a
                > > folder called "CodeCommentRep ort". There is no xml file here though).
                > >
                > > I have also tried copying the doc.xml file that was created when I build[/color]
                > the[color=green]
                > > solution into the same dir as my code files and that didn't work either.
                > >
                > > What do I do from here, because it's still now working.
                > >
                > >
                > >[/color]
                >
                > Just to go over the steps, these work for us:
                > 1) in the project properties, write a filename for XML documentation
                > (Configuration Properties | Build)
                > the default name seems to be: same directory/filename as dll,
                > except a ".xml" extension instead of ".dll"
                > 2) REbuild the project to generate/update this XML file,
                > no need to generate the documentation html-files.
                > (If you just "build" the project then the xml-file is not updated.)
                > 3) reference this dll in the other project, xml (and pdb) files
                > are automatically copied
                >
                >
                > Hans Kesting
                >
                >[/color]


                Comment

                • Ravichandran J.V.

                  #9
                  Re: why don't my comments work?

                  One, the XML file must be the same as the Assembly i.e., if the .dll
                  file in the Bin folder is myAssembly.dll then, the XML file,too, must be
                  named as myAssembly.xml. Two, in the project properties Configuration
                  Section, click the Build Options and association the XML file in the XML
                  Configuration or Association field (I do not remember the exact name of
                  the field).

                  with regards,


                  J.V.Ravichandra n
                  - http://www.geocities.com/
                  jvravichandran
                  - http://www.411asp.net/func/search?
                  qry=Ravichandra n+J.V.&cob=aspn etpro
                  - http://www.southasianoutlook.com
                  - http://www.MSDNAA.Net
                  - http://www.csharphelp.com
                  - http://www.poetry.com/Publications/
                  display.asp?ID= P3966388&BN=999 &PN=2
                  - Or, just search on "J.V.Ravichandr an"
                  at http://www.Google.com

                  *** Sent via Developersdex http://www.developersdex.com ***
                  Don't just participate in USENET...get rewarded for it!

                  Comment

                  • Hans Kesting

                    #10
                    Re: why don't my comments work?

                    One final point:

                    After you have changed & recompiled your library project/solution,
                    you need to recompile the project (solution) you are using it in, so the
                    new dll + xml are picked up.

                    Hans Kesting


                    "suzy" <me@nospam.co m> wrote in message
                    news:%233dSKKm6 DHA.2392@TK2MSF TNGP11.phx.gbl. ..[color=blue]
                    > Great Hans,
                    >
                    > Thanks so much, that works (finally!!!)
                    >
                    > :)
                    >
                    >
                    > "Hans Kesting" <news.2.hansdk@ spamgourmet.com > wrote in message
                    > news:uWOo48l6DH A.1556@tk2msftn gp13.phx.gbl...[color=green]
                    > >
                    > >
                    > > Just to go over the steps, these work for us:
                    > > 1) in the project properties, write a filename for XML documentation
                    > > (Configuration Properties | Build)
                    > > the default name seems to be: same directory/filename as dll,
                    > > except a ".xml" extension instead of ".dll"
                    > > 2) REbuild the project to generate/update this XML file,
                    > > no need to generate the documentation html-files.
                    > > (If you just "build" the project then the xml-file is not updated.)
                    > > 3) reference this dll in the other project, xml (and pdb) files
                    > > are automatically copied
                    > >
                    > >
                    > > Hans Kesting
                    > >
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    Working...