XML Documentation

This is a discussion on XML Documentation within the C# Programming forums, part of the General Programming Boards category; I'm talking about this... Code: /// <summary>This is my class for doing things</summary> public class MyClass { } OK. If ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209

    XML Documentation

    I'm talking about this...

    Code:
    /// <summary>This is my class for doing things</summary>
    public class MyClass
    {
    
    }
    OK. If I include such xml documentation in an external library (dll), Visual Studio will show the comments in Applications referencing the library, provided the library source project is open within the same instance of VS as the application. However if I just reference the dll, the comments are no longer present. I assume this is because the XML commenting is not bound into the library.

    Is there a way for me to import the XML into other VS solutions without the need for the library's source also being present?

    Thanks.

  2. #2
    ...and never returned. StainedBlue's Avatar
    Join Date
    Aug 2009
    Posts
    168
    IN YOUR .DLL (Class Library) Project...

    1. Go to Project -> Project Properties...

    2. On the "Build" tab toward the bottom, check "XML Documentation File"

    3. IMPORTANT: Make sure to name the file the same as your project
    (for some reason it doesn't work if you specify a different name, or at least it doesn't work for me, stupid it even lets you choose)

    -----------------------------------------------------

    IN PROJECT(S) REFERENCING THE .DLL...

    1. Remove the reference (and delete any .DLL, .PDB from the bin folder if "Removing" didn't remove everything)

    2. Re-reference the .DLL and you should see your XML documentation!
    Last edited by StainedBlue; 05-02-2010 at 08:00 PM.
    goto( comeFrom() );

  3. #3
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    StainedBlue, that's perfect. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XML string to dataset/datagrid?
    By Striph in forum C# Programming
    Replies: 3
    Last Post: 05-02-2010, 09:11 PM
  2. Parsing Xml
    By deviousdexter in forum C# Programming
    Replies: 7
    Last Post: 04-24-2009, 06:29 AM
  3. Dissecting an Excel XML spreadsheet
    By desmond5 in forum C++ Programming
    Replies: 1
    Last Post: 05-22-2008, 04:32 PM
  4. XML encoding issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-16-2008, 05:21 AM
  5. XML and data exchange
    By seexml in forum C Programming
    Replies: 0
    Last Post: 04-27-2006, 03:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21