dll reference problems

G

Guest

Hi all, I have a VB Project in VS2005 containing a few .vb files which have
the appropriate classes:-

Namespace - MyNameSpace
Objects.vb - Objects Class
Providers.vb - Providers Class

I needed to write a Jscript.Net class to encapsulate some Jscript.Net
specific functionality, so I created a seperate folder, wrote the .js file
and compiled it using jsc.exe & referenced the dll from the vb project
above.

I then went back to the VB project, added a reference to the dll created by
the jsc.exe compiler and tried to invoke some code by instantiating the JS
class and setting one of the properties. I got the following error when
compiling the VB project in VS2005:-

Error 21 Reference required to assembly 'MyNameSpace, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' containing type
'MyNameSpace.Objects.Application', but a suitable reference could not be
found due to possible circular references:
Assembly 'MyNameSpace.RulesEngine.Processor.dll' references project
'MyNameSpace'
Project 'MyNameSpace' references assembly
'MyNameSpace.RulesEngine.Processor.dll'. C:\vs 2005
code\MyNameSpace\Providers.vb 1803 17 MyNameSpace


Any Ideas?

TIA!
 
M

[MSFT]

Hello,

Did your JS file also define namespace "MyNameSpace" and contains a class
named "Objects.Application"? From error message, it seems there is a
circular reference in your projects, did your JS assembly also reference
your VB project?

Luke
 
G

Guest

Yeah, I figured it out. My Js assembly also referenced the VB project
causing the cirular reference. I got rid of that and it worked.

TIA!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top