473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

dll from another project in visual studio 2005

Hi

I am making a project in VB.net visual studio 2005, and i want to use a .dll file from another project which has been made in visual studio 2003.

When i try adding a reference to this dll from VB.net 2005, i get an error "A reference to ..\xyz.dll cannot be added. Please make sure that the file is accessible, and it is a valid assembly or COM component"

Can we add a normal .dll or is it that it has to be a COM component???

Need help urgently.

Thanks
Jun 4 '07 #1
8 9889
debasisdas
8,127 Expert 4TB
Hi
devilbrat
Welcome to TSDN.

You have reached the right place for knowledge shairing.

Here you will find a vast resource of related topics and code.

Feel free to post more doubts/questions in the forum.

But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.
It will help Experts in the forum in solving/underestanding your problem in a better way.
Jun 4 '07 #2
i am right clicking on the project in Solution explore, and trying to add a reference. In the reference window, under the browse tab, i try to add a reference to my dll. I have also copied that dll into the project directory. But when i select the dll and click on ok i get a message box saying"A reference to the dll could not be added. Make sure the file is accessible, and it is a valid assembly or COM component"

The dll was made in VC++ 6.0

Does vb.net not support simple dlls?? or am i doing something wrong??
Jun 4 '07 #3
kenobewan
4,871 Expert 4TB
I believe you need to open it in 2005 to convert, so better off using a COM. HTH.
Jun 4 '07 #4
Frinavale
9,735 Expert Mod 8TB
i am right clicking on the project in Solution explore, and trying to add a reference. In the reference window, under the browse tab, i try to add a reference to my dll. I have also copied that dll into the project directory. But when i select the dll and click on ok i get a message box saying"A reference to the dll could not be added. Make sure the file is accessible, and it is a valid assembly or COM component"

The dll was made in VC++ 6.0

Does vb.net not support simple dlls?? or am i doing something wrong??
I've had no problems using a VB6 DLL in my project.
Is this a web application that you're working with?

It sounds like you have a permissions problem. I'd suggest moving the DLL to a folder where permissions are set to allow your program to use the DLL..then re-referencing the DLL into your project.

I've had problems in the past where my web user account was not given permissions to use the DLL...it wouldn't work properly until I moved it to a directory that gave my program permissions to use it.

Cheers!

-Frinny
Jun 4 '07 #5
Motoma
3,237 Expert 2GB
Most likely it is a native binary DLL, as opposed to a .NET assembly or COM object. You can only add .NET assemblies or COM object as references. If you want to reference a COM object, it should first be registered on the machine.

If you want to include a native DLL, you will have to use the DllImport keyword and include the DLL file in the same directory, or in one of the directories in your PATH.
Jun 4 '07 #6
ya its a native dll, i have used dll import command, and have added the dll in my project folder. After i publish the project, it works perfectly fine on my PC. but when i install the setup on another machine, then after running the project, it gives a dll not found exception.The published setup does contain the dll but its path is somehow not found on the other PC. im giving a relative path for the dll.
Jun 5 '07 #7
Motoma
3,237 Expert 2GB
ya its a native dll, i have used dll import command, and have added the dll in my project folder. After i publish the project, it works perfectly fine on my PC. but when i install the setup on another machine, then after running the project, it gives a dll not found exception.The published setup does contain the dll but its path is somehow not found on the other PC. im giving a relative path for the dll.
I think you can just use the DLL name if you put it in the same directory as the EXE, or if you put it in one of the standard folders (I.E. the PATH system variables: windows\system32 ...etc).
Jun 5 '07 #8
Bum
19
Sometimes when it says "file not found", it's not the dll that's missing, but a component that makes up the dll. Look at the dlls dependencies using someting like DLLExplorer. The dlls dependencies are on your pc, but not the client's. Hope this helps.
Feb 12 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: mcwooq | last post by:
Hi, I just installed the VS.Studio 2005 Team Edition for Developper and encountered severe problems with debugging ASP.NET 2.0 projects. Even newly empty created ASP 2.0 projects can't debug...
4
by: Stimp | last post by:
How do you copy a vs.net project from one computer to another? Here are the steps I tried, but it failed... - Copied project directory from wwwroot of source to wwwroot on destination (e.g....
9
by: Stimp | last post by:
I'm trying to copy an asp.net project onto another computer in order to work on it from there as well. Whatever way I set up the directory in IIS the project cannot be run on the new computer (I...
0
by: Manikandan | last post by:
Hi, I have a c# project in VSS 6.0D as projectv1 (v1 for version 1) Projectv1 has five or six solutions and around 100 projects (including setup projects). I need to create the version 2 for the...
2
by: Norman Diamond | last post by:
My C# code is I18N'ed by appropriately naming and editing .resx files. At execution time, it works. My C++ code is somewhat I18N'ed. When I put UI code in C++ I use .rc files. When I link to a...
1
by: Cramer | last post by:
I'm running XP Pro/SP2 + patches and updates, with Visual Studio Professional 2008 (and no prior installation of Visual Studio ever installed). When attempting to open an ASP.NET Web application...
4
by: Vili | last post by:
How to copy a visual studio 2005 web project with another name? I have a visual studio project 2005 web project "myWebSite1" in visual source safe I would like to copy this project with another...
6
by: Author | last post by:
I have VS 2005 professional. Here is the version info: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP .050727-7600) © 2005 Microsoft Corporation. All rights reserved. When I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.