473,473 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

referencing an assembly and a project which references the same assembly

We have a solution which contains 2 projects. The first project is a
windows control and it references an assembly. The second project is a
test windows application used to test the windows control from the
first project. As such, it references the windows control using a
project reference. In addition, it also references the same assembly
that the first project references.

The assembly which is referenced by both projects contains some UDT's
that are needed in both projects. However, when referenced as
mentioned above, we get errors such as:

Value of type 'RLC.Image.Collections.ImageInfoCollection' cannot be
converted to 'RLC.Image.Collections.ImageInfoCollection'.

where RLC.Image.Collections.ImageInfoCollection is one of the UDT's in
the referenced assembly. Also we get a number of the following errors
where the signature of an overloaded method with a primitive argument
can be used, but the other overloaded methods with UDT as the argument
cannot:

Overload resolution failed because no accessible 'LoadImages' can be
called with these arguments:
'Public Sub LoadImages(documentInfoCollection As
RLC.Image.Collections.ImageInfoCollection)': Value of type
'RLC.Image.Collections.ImageInfoCollection' cannot be converted to
'RLC.Image.Collections.ImageInfoCollection'.
'Public Sub LoadImages(imagePathCollection As
RLC.Image.Collections.ImagePathInfoCollection)': Value of type
'RLC.Image.Collections.ImageInfoCollection' cannot be converted to
'RLC.Image.Collections.ImagePathInfoCollection'.
'Public Sub LoadImages(documentInfo As RLC.Image.DocumentInfo)':
Value of type 'RLC.Image.Collections.ImageInfoCollection' cannot be
converted to 'RLC.Image.DocumentInfo'.
'Public Sub LoadImages(imagePath As String)': Value of type
'RLC.Image.Collections.ImageInfoCollection' cannot be converted to
'String'.

Anyone ever experienced this? I'm assuming it has to do with the way
the references are being read.

Thanks!

--
Christopher C. Bernholt
I.T. Research & Development
R+L Carriers, Inc.

Nov 21 '05 #1
4 2869
It sounds as if you have two different copies of the same code in your
UDT .dll. Are all the projects in the same solution? How is the UDT
assembly referenced in both projects? Do they just have a copy of the
..vb file or do they directly reference a compiled .dll?

Is the UDT code, that both projects reference, a compiled .dll or does
each project have a copy of the .vb file?

Nov 21 '05 #2
> It sounds as if you have two different copies of the same code in your
UDT .dll. Are all the projects in the same solution?
There is 1 solution with 2 projects, the project for the control
itself, and the test project.

How is the UDT assembly referenced in both projects? Do they just have a copy
of the .vb file or do they directly reference a compiled .dll?
They directly reference a compiled .dll although not the same physical
..dll. Each project has a ref folder in which the dll is stored and
each project references the .dll from its own ref folder. So for
instance if project 1 was in MyProjects\Project1 and project 2 was in
MyProjects\Project2, the dll reference would be
MyProjects\Project1\ref\assembly.dll for project 1 and
MyProjects\Project2\ref\assembly.dll for project 2. The dll's are
identical copies of each other.


Is the UDT code, that both projects reference, a compiled .dll or does
each project have a copy of the .vb file?


I'm not sure I understand the difference between this question and the
question above. All UDT functionality is accessed via a reference to a
compiled .dll as above. If I'm missing something in your question,
please let me now.

-- Chris

--
Christopher C. Bernholt
I.T. Research & Development
R+L Carriers, Inc.

Nov 21 '05 #3
> I'm not sure I understand the difference between this question and
the
question above. All UDT functionality is accessed via a reference to a compiled .dll as above. If I'm missing something in your question,
please let me now.
Sorry about the duplicate question. In your original post you state
this:

<quote>
Value of type 'RLC.Image.Collections.ImageInfoCollection' cannot be
converted to 'RLC.Image.Collections.ImageInfoCollection'.
</quote>

Even though the two variables seem to have the same namespace and type
name, the compiler thinks they are different.

This suggests to me that there are two different versions of the
collection floating around. As if the same source code was used in two
separate projects. And even though they both resulted in the same
assembly name, they are seen as being different. Perhaps the
AssemblyVersion or AssemblyFileVersion for the two .dlls are different.
Have you inspected the two copies of the .dll and confirmed that the
file version number and assembly version numbers are the same? Perhaps
you can load them up in ILDASM and inspect each one and see if you can
see any differences in them.

Just some thoughts, good luck.

Chris

-- Chris

--
Christopher C. Bernholt
I.T. Research & Development
R+L Carriers, Inc.


Nov 21 '05 #4

Thanks, This thread helped me solve my problem:
One solution that includes some projects, some of the projects has
reference to dll files.

When updating the dll reference only in one project, I got 'compiling'
error messages as
* 'fName Declaration' is declared in project 'xxx.dll', which is not
referenced by project 'myUpdatedProj.exe'.
(I do have a reference to this dll!)
* Value of type 'lib1.objectType1' cannot be converted to
'lib1.objectType1' .

so I removed the not-yet-updated-projects from the solution, and I have
no 'compiling' error, I can now build my project !

I only have to re-Add the other projects...

Atara

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #5

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

Similar topics

2
by: Torrance S. | last post by:
Hi, I have a class in an assembly that references a value in web.config like this: <appSettings> <add key="mykey" value="myvalue"/> </appSettings> string temp =...
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
12
by: Pollux | last post by:
I'm having trouble doing someting apparently simple. I'm still not very familiar with Visual Studio 2003, so apologies if I've missed something obvious. Basically my problem is the following. I...
2
by: Ron | last post by:
I need to write a custom textbox control that references an object located in the Global.asax class, but I can't compile the control into a DLL without including the reference to the project DLL...
1
by: asp to .net | last post by:
I am now moving over from classic to .net and I must say, very impressed! I am having problems with figuring out how to create a webmethod that just references a function in a helper file that I...
2
by: john | last post by:
Maybe I haven't had that "a-ha" moment yet, but I think the new approach to web projects is a step in the wrong direction. My main beef is that control over the assembly generation process has...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
1
by: Dave Anson | last post by:
What is the recommended practice for referencing assemblies in a project from other solutions? I am using Visual Studio 2005 Team System. I have several assemblies in another solution which will...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
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
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
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...
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.