473,513 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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?
Aug 1 '06 #1
4 5501
I am not sure why you want to do it that way, just simply reference this
dll in your project.

m11533 wrote:
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?
Aug 2 '06 #2
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" <m1****@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
>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?

Aug 2 '06 #3
I want to include the dll in the solution as it is under source control just
like the rest of the solution. The intended behavior is that when the
solution is "Opened from Source Control", the dll will be fetched/checked-out
along with all of the source files in the "normal" projects.

The technique I've described has been used with other third party products,
but this is the first that I've been responsible for adding, and of course
mine does not work while the others do.

If I just add a direct reference to the file, with the file placed in some
arbitrary location in the source code tree, wouldn't it be omitted from an
"Open From Source Control"?

"Jianwei Sun" wrote:
I am not sure why you want to do it that way, just simply reference this
dll in your project.

m11533 wrote:
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?
Aug 2 '06 #4
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" <m1****@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
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?


Aug 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1500
by: jinksk | last post by:
I am brand new to .NET. For that matter, so is my whole corporation, hence this dumb question. How can I set-up MSDE or SQL Server Desktop to work with VS.NET and the various development languages....
2
1824
by: M Skabialka | last post by:
I installed Visual Studio Beta 2005 but setting up the SQL server was so complex I uninstalled it and put Visual Studio 2003 Academic on. I am totally new to Visual Studio and trying to teach...
4
2749
by: David Davis | last post by:
Woll2Woll has a product for Delphi called Infopower which has a rtf control with a built-in word processor. Does anyone know of a third party control that has the same capabilities. I don't have...
4
362
by: Steve Drake | last post by:
All, If you right click on a word doc, you can see and set the custom props for the document, how can this be done in C# (or any other lang) I don't want to automate word as this will be...
2
1200
by: sonu | last post by:
Hi all, I have posted this topic previously but still not able to find out any solution for this probelm. The scenario is like I am using a third party activeX Control in my project. I have...
0
1047
by: sonali_reddy123 | last post by:
Hi all, I am using one third party control in my application basically the control shows evaluation dialog each time when I create the object of that component. To overcome issue I have...
7
2178
by: reju | last post by:
I have an dataset/xml file which contains data. I want to create a pdf file after some formating. The main point is that no third parties can be used.
3
6030
by: Billy Bob | last post by:
Hello I've got three network adapter on my machine, and I'm looking to use WMI to set the IP address of each apapter but I need some help. My network adapters are Intel (R) Pro/100 VE, PRO/1000...
6
2473
by: AGP | last post by:
I resisted for many years but I've just written my first app in .NET2005 and am looking to deploy my app with a third-party installer. ClickOnce and the VS Installer do not meed my needs and I am...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.