472,142 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

SOLUTION : indirect reference to assembly

I saw a small number of old threads about a strange build error, but never
saw a solution. I just spent about 4 hours debugging this so i hoped i
could help out people who come across this problem by posting a solution.
Anyway, here is what i was experiencing and how i fixed it ...

The Build Error:
Project '<projectname>' makes an indirect reference to assembly
'<assemblyname>' which contains '<classname>'. Add a reference to
'<assemblyname>' to your project.
The problem:
I did have project reference. Grrrr!
No line numbers , the .NET help topic ...no use.

Setup :
Assembly_A --> contains public class (Class_A) which contains Public Enum
(Enum_A)
these enum is within the class (not sure if this matters)

Parent_B --> public property (Prop_forEnumA) get/set of type
Assembly_A.Class_A.Enum_A

Child_C --> public property (Prop_forEnumA) get/set of type
Assembly_A.Class_A.Enum_A
Steps :

Parent_B instantiates instance of Child_C
Parent_B runs a line of code something like

myChild_C.Prop_forEnumA = Me.Prop_forEnumA '<-- breaks here

Resolution:
myChild_C.Prop_forEnumA = System.Convert.Int32(Me.Prop_forEnumA) '<-- not
broken
================================================== =
The closest i could find was a 2002-12-29 thread in
microsoft.public.dotnet.languages.vb by Shahin Kohan.

http://groups.google.com/groups?hl=e...oogle%2BSearch

- - - - - - - - - - - - - - - - - - - - - - - - - -
- When I try to build a project I get the following Error.

C:\Projects\MembershipManager\MMSystemWinUI\frmPay mentTypes.vb Project
'MMSystemWinUI' makes an indirect reference to assembly 'MMCommon', which
contains 'Valleris.MMCommon.IMemberClass'. Add a reference to 'MMCommon' to
your project.

I already have a refernace to MMCommon in the referance section. Can anyone
tell me why I get this.

Shahin- - - - - - - - - - - - - - - - - - - - - - - -
- - - Hi,

The problem has been reported before. However, it cannot be reproduced. The
problem was resolved by creating a new project and adding all the files
into it.

Please try it to see whether it helps.

--
Parker Zhang
Microsoft Developer
upport- - - - - - - - - - - - - - - - - - - - - - - -
- - -

I was able to solve it by doing the following:

1. Delete all dll and exe's that are created from all the projects in the
solution
2. Delete all the referances from all projects to each other in the same
solution
3. Add all the referances again back to all the projects
4. Recomplile the projects
Also I have noticed this to be a problem when you have strong names. If it
happens again I will be more then happy to help you reproduce it.

I hope this problem is resolved in the next version.

Shahin============================================ =======
Anyway, hope that helps.
-eric
Nov 20 '05 #1
0 3456

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Christopher Burns | last post: by
13 posts views Thread by ganeshb | last post: by
3 posts views Thread by Ray Mitchell | last post: by
5 posts views Thread by Tim Marsden | last post: by
reply views Thread by xzzy | last post: by
5 posts views Thread by Rahul B | last post: by
reply views Thread by leo001 | last post: by

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.