473,387 Members | 1,578 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,387 software developers and data experts.

Compile error when using reference to own dll

Hi,
I have a problem when I am trying to compile the .vb assembly to dll
in VB studio 2005 Express Edition.

I have my onw dll, which looks like:

Public Class CL1
Public Shared Function FN1(...) As String
...
End Function
End Class
(in .vb format)

and I have another assembly, in which I have an reference to my
previous dll

Imports CL1
Public Class CL2
Public Shared Function FN2(...) As String
...
End Function
End Class

In VB studio 2005 I created an reference to my dll assembly and all
works fine, but when
I try to create an dll from saved .vb file (vbc.exe /target:library c:
\CL2.vb) I got an error:

Warning: BC40056: Namespace or type specified in the Imports
'DotNetNuke.Services.Upgrade' doesn't contain any public member or
cannot be found. Make sure the namespace or the type is defined and
contains at least one public member. Make sure the imported element
name doesn't use any aliases.

Could someone help how to create the dll file with reference to my own
dll?

Thanks a lot.

Jitsu

Jun 29 '07 #1
2 1910
* Carles Vela i Aulesa wrote, On 29-6-2007 17:24:
Hi,
I have a problem when I am trying to compile the .vb assembly to dll
in VB studio 2005 Express Edition.

I have my onw dll, which looks like:

Public Class CL1
Public Shared Function FN1(...) As String
...
End Function
End Class
(in .vb format)

and I have another assembly, in which I have an reference to my
previous dll

Imports CL1
Public Class CL2
Public Shared Function FN2(...) As String
...
End Function
End Class

In VB studio 2005 I created an reference to my dll assembly and all
works fine, but when
I try to create an dll from saved .vb file (vbc.exe /target:library c:
\CL2.vb) I got an error:

Warning: BC40056: Namespace or type specified in the Imports
'DotNetNuke.Services.Upgrade' doesn't contain any public member or
cannot be found. Make sure the namespace or the type is defined and
contains at least one public member. Make sure the imported element
name doesn't use any aliases.

Could someone help how to create the dll file with reference to my own
dll?

Thanks a lot.

Jitsu
You need to specify which libraries you're linking to when compiling
from the command line. I'm a C# guy, so I don't know the vb syntax for
this by heart. But vbc /? should get you started.

Jesse
Jun 29 '07 #2
Many thanks Jesse,
You were right! :)

So the correct command is:

vbc.exe /target:library c:\CL2.vb /r:C:\CL1.dll

or in case of more dll:

vbc.exe /target:library c:\CL2.vb /r:C:\CL1.dll,C:\CL1a.dll,C:
\CL1b.dll

Thanks ;)

Jitsu


Jul 3 '07 #3

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

Similar topics

5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
2
by: d2d | last post by:
How are you doing there folks? I just have this newbie question about how to compile an NUnit test file from command line using "csc.exe" I installed NUnit 2.1 using *.msi file. I was...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
4
by: Seok Bee | last post by:
Dear Experts, I've completed my console application and now wants to compile the application and an executable file to be run at another location. However, I've tried compiling that program in...
2
by: Shachar | last post by:
Hi All, When I'm trying to compile a class library with no web reference to x64 Release I Succeed. When trying to compile a class library with web reference to x64 Debug I Succeed. When...
27
by: Rene | last post by:
I keep getting the following error every time I compile the solution under VS 2005: ---------------- Error 5 Unable to copy file "obj\Debug\xyz.dll" to "bin\Debug\xyz.dll". The process...
0
by: ufnuceda | last post by:
Hello everyone, I was wondering if any of you have some experience with the boost library. I am having trouble compiling code with it. Since boost is being used a lot these days I thought some...
4
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following:...
2
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.