Re: Setting up Third Party .NET dll in visual studio with C#



I just figured out what I have wrong and it turns out to be pretty simple.
The problem is that I named the project that contains the dll in question in
such a way that it colides with the namespace defined in the dll. If I rename
my dll project to avoid this collision, everything works properly, just as it
already does for other dlls handled in this way.


"Robbe Morris [C# MVP]" wrote:

What you are trying to do is senseless. Just add a reference
to those "real" projects that need to use it. You aren't going
to get away from adding a reference in those projects that need it.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Microsoft .NET Search Engine Scoring Analysis
How does your site rate?
http://www.topichound.com




"m11533" <m11533@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6A5FEB5D-797A-4FF5-B914-622F7FD0AE49@xxxxxxxxxxxxxxxx
I am developing a large application with Visual Studio .NET 2003 using C#.
We
recently added a new third party product with a native .NET library. I
want
to place this third party product's dll in a VS Project of its own, and
then
reference that project from those c# projects in my solution that are
dependent on the third party product.

I created a c# class library project, ThirdPartyDll. Placed the dll file
in
question into that project's directory and added it to my project. I
removed
all other files in the project, and all references. The dll has the build
action of "content".

So far, so good (well, maybe not)

I go to the project that needs to reference this third party library and
add
a project reference to my third party class library project ThirdPartyDll.
But, now I try to find the right "using" statement in my c# for
ThirdPartyDll
and can not find a string that Visual Studio will properly resolve?

What am I doing wrong?

What is the "right" way to create a Visual Studio project to wrap an
existing dll such that I can include that project in any projects that
must
reference its functionality?



.



Relevant Pages

  • Re: Setting up Third Party .NET dll in visual studio with C#
    ... I am not sure why you want to do it that way, just simply reference this dll in your project. ... I want to place this third party product's dll in a VS Project of its own, and then reference that project from those c# projects in my solution that are dependent on the third party product. ... I go to the project that needs to reference this third party library and add a project reference to my third party class library project ThirdPartyDll. ...
    (microsoft.public.dotnet.languages.csharp)
  • Creating a .NET DLL
    ... For the vb.net class library project, ... Public Class WcServerAPI ... It's the easiest method for a dot net developer to use your component because they just add a reference to your dll and then everything appears in intellisense like other classes and methods available to the developer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Setting based 1 Arrays
    ... VB.NET marshalling modules, ... I created new VB.NET Class Library Project ... Compiled it to create a DLL ... aborted with the first reference to WildcatServerConnectSpecific- ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Setting up Third Party .NET dll in visual studio with C#
    ... to get away from adding a reference in those projects that need it. ... recently added a new third party product with a native .NET library. ... Placed the dll file ... a project reference to my third party class library project ThirdPartyDll. ...
    (microsoft.public.dotnet.languages.csharp)
  • working with a 3rd party dll file in vista
    ... I am trying to use a dll provided by a third party. ... they assure me that it works fine on XP, so I would assumethat it would work in Vista. ... So my vb.net code needs to call the DLL, and I have not really done this before. ... Do I have to regsrvr32 the dll or just add it as a reference to my vb.net project so that I can access it? ...
    (microsoft.public.dotnet.languages.vb)