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

Using a project reference rather than assembly reference prevents an interface from working

P: n/a
This seems like a strange one, but perhaps someone can shed some

I have an interface: ItciEngine implemented by class tciEngine. Two
public methods in this class pass an object I've created: uiMessage:

Public Function TesterInteract(ByVal luiMessage As IuiMessage) As
Implements ItciEngine.TesterInteract

Public Sub UiComplete(ByVal returnMessage As IuiMessage) Implements

In order to pass the uiMessage objects, I've implemented an interface
to the uiMessage: IuiMessage. Passing the interface (IuiMessage)
rather than the object (uiMessage) allows me to pass the user-defined
objects across the ItciEngine interface.

I build the uiMessage class and IuiMessage interface as a .dll in a
uiMessage project. I build the ItciEngine interface as a separate
..dll in an ItciEngine project.

tciEngine is built in the main application project.

Now... this all works fine as long as I don't use a project reference
to IuiMessage in my main project. If I:

1. Remove the reference to the IuiMessage.dll in the main project
2. Add a project reference to the IuiMessage project in the main
3. Rebuild the solution

Then the Task List complains about my interface methods above:

C:\Scott\dotNet\tciApp\tciEngine.vb(9): 'tciApp.tciEngine' must
implement 'Overridable Function TesterInteract(luiMessage As
IuiMessage) As IuiMessage' for interface 'ItciEngine'.

C:\Scott\dotNet\tciApp\tciEngine.vb(9): 'tciApp.tciEngine' must
implement 'Overridable Sub UiComplete(returnMessage As IuiMessage)'
for interface 'ItciEngine'.

C:\Scott\dotNet\tciApp\tciEngine.vb(190): 'TesterInteract' cannot
implement 'TesterInteract' because there is no matching function on
interface 'ItciEngine'.

C:\Scott\dotNet\tciApp\tciEngine.vb(194): 'UiComplete' cannot
implement 'UiComplete' because there is no matching sub on interface

It's complaining about the interface on line 9 for both functions
informing me that I must implement for the interface. Then it's
complaining about the way I've implemented.

So... am I doing something here that I shouldn't be? If I switch the
reference back to an assembly reference, all is good again.

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.