我们正在尝试在VB.NET环境中编写一个使用NServiceBus库的应用程序。我们一直被类似以下错误所困扰:
引用程序集'NServiceBus,Version=2.0.0.1071,Culture=neutral,PublicKeyToken=9fc386479f8a226c'时需要实现接口'NServiceBus.IMessageHandler`1'。请将其添加到项目中。
我们的项目已经包含了来自相同NServiceBus 2.0 RC2发行版的NServiceBus.dll和NServiceBus.Core.dll的引用。
重现步骤:
引用程序集'NServiceBus,Version=2.0.0.1071,Culture=neutral,PublicKeyToken=9fc386479f8a226c'时需要实现接口'NServiceBus.IMessageHandler`1'。请将其添加到项目中。
我们的项目已经包含了来自相同NServiceBus 2.0 RC2发行版的NServiceBus.dll和NServiceBus.Core.dll的引用。
重现步骤:
- 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.
使用C#编写的相同项目没有编译错误。
有什么解决这个问题的想法吗?(是的,我的首选解决方案是切换到C#,但目前不可接受。)