By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,559 Members | 1,150 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,559 IT Pros & Developers. It's quick & easy.

SOLUTION : indirect reference to assembly

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.