Using <param> XML tag to create Intellisense for my DLL.


M

Michael.Suarez

So I wrote a DLL in 2.0. An example of one of the funtions is:

/// <summary>
/// db_task..file_master_list
/// </summary>
/// <param name="panConnection">
/// Pass the PanApp.Connection object by reference
/// </param>
/// <param name="source_id">
/// Default Value = 0
/// </param>
/// <param name="frequency_cd">
/// Default Value = ""
/// </param>
public static int file_master_list(ref SqlConnection panConnection, int
source_id, string frequency_cd, string search_string)
{
return 0;
}

This alone, did NOT give me the intellisense from the app calling this
DLL.

So I added /doc:db_taskLib.dll.xml as the only Pre-Build event.

On the build, I get the error:
The command "/doc:db_taskLib.dll.xml" exited with code 123.

In the bin/debug folder, I have an XML file consisting of just this:
<?xml version="1.0" ?>
- <doc>
- <assembly>
<name>db_taskLib</name>
</assembly>
<members />
</doc>

despite the fact that there is a ton of XML in my code.
Additionally, there are still no comments poping up with my
intellisense.

I have searched the forums pretty thouroughly on this topic, and
according to what I am reading, I have done enough that it SHOULD work,
but it's not.

If anyone has any idea what else I need to do, please let me know.

Thanks,
Mike
 
Ad

Advertisements

G

Guest

Mike,
Normally the only requirement to have complete xml documentation generated
during a build is to right-click the project in Solution Explorer, navigate
to the Configuration Properties / Build node, and fill in a path and xml
filename in the
"XML Documentation file" textbox, such as "doc\mylibraryname.xml"
Peter
 
G

Guest

P.S.--
In 2.0, under the Build Menu, check the "XML Documentation File" checkbox
and ensure there is at least the default file name there.
Peter
 
M

Michael.Suarez

Thanks for the response!

I had the /doc:db_taskLib.dll.xml command as a pre-build event.
I didnt notice it in the Configuration Properties/Build node.

So I changed it, and I am no longer getting that exit code 123 error on
the build... AND I am getting an XML file that matches whats in the
source code.

However, still no Intellisense when i reference my DLL from another
project.
I get a bunch of warnings because I have <param> tags describing some,
but not ALL parameters... is it a requirement that all the parameters
of a function have tags for the intellisense to work?
 
C

Christoph Nahr

However, still no Intellisense when i reference my DLL from another
project.
I get a bunch of warnings because I have <param> tags describing some,
but not ALL parameters... is it a requirement that all the parameters
of a function have tags for the intellisense to work?

No, although it would be nice if your documentation were complete!

But your problem, I think, is that you're referencing the DLL only.
The XML file resides in the DLL directory; but Visual Studio looks for
XML documentation files in its temporary build directories (named
"Build" or "Release" and located under project directories).

You need to reference the Visual Studio _project_ that is used to
build this DLL. That will cause VS to copy all output files to its
build directories -- both the DLL and the XML file -- and IntelliSense
should work on this library.

There should be an alternative way since the CLR DLLs aren't copied to
the build directories, yet IntelliSense works on them anyway... but I
don't know how to do that for your own libraries.
 
M

Michael.Suarez

Thank You.

I agree, there should be a way to have the intellisense work
referencing just the DLL... hopefully in 3.0....

But anyway, if I create a project in the same solution as my DLL, I can
reference that project no problem. I click 'Add Reference', go to the
Projects Tab, and there it is. And when I reference the project, the
intellisense works like a charm!

But... if I need to reference the project from a different solution and
click 'Add References', and go to the Projects Tab, the list is empty,
and there doesnt seem to be a way to fill it with a project from
another solution. Using Browse does not work, because it is only
looking for files that can be components, and if I filter on *.*, and
select a project file, it gives me an error becuase a project file is
not a component.

Any idea how to reference a project from another solution?
 
Ad

Advertisements

C

Christoph Nahr

Any idea how to reference a project from another solution?

Just add the project itself. Don't use "Add Reference" -- use "Add
Existing Project", then select the project file.
 
M

Michael.Suarez

hmm... i was afriad that was going to be the answer.

see the thing i liked about just adding the dll as a reference is that
lets say i am building a new project, and referencing the dll... then
someone else goes and changes that dll and re-builds it, and puts the
update out on the network... my dll, which is pointing to that file on
the network automatically refreshes with those new changes.

If i have to add the whole project to my solution, then someone goes
and adds something to the assembly and rebuilds it, does my reference
to the project automatically update?
 
Ad

Advertisements

M

Michael.Suarez

I just answered my own question here. Yes, the reference to the project
updates when someone else updates the project.

Being able to reference just the DLL would be ideal, but referencing
the whole project gets the job done.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top