"Reference required" error when referencing NServiceBus assembly from another project
Posted
by cwegrzyn
on Stack Overflow
See other posts from Stack Overflow
or by cwegrzyn
Published on 2010-02-03T16:45:56Z
Indexed on
2010/03/19
14:51 UTC
Read the original article
Hit count: 291
We are trying to write an application that uses the NServiceBus library in a VB.NET environment. We've been stymied by errors similar to the following:
Reference required to assembly 'NServiceBus, Version=2.0.0.1071, Culture=neutral, PublicKeyToken=9fc386479f8a226c' containing the implemented interface 'NServiceBus.IMessageHandler`1'. Add one to your project.
Our project already includes references to NServiceBus.dll and NServiceBus.Core.dll from the same NServiceBus 2.0 RC2 distribution.
Steps to reproduce:
- Create a new VB Class Library Project (.NET 3.5)
- Add NServiceBus.dll and NServiceBus.Core.dll as References.
Put the following code in Class1.vb:
Imports NServiceBus.Sagas.Impl Class Test Public Function Foo() As SagaMessageHandler Return Nothing End Function End Class
- You should now see the compiler error mentioned above.
An identical project written in C# has no compile errors.
Any ideas about how to solve this problem? (And, yes, my preferred solution is switching to C#, but no, that's not an acceptable one at the moment.)
© Stack Overflow or respective owner