orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Could not load type 'Orleans.ObserverSubscriptionManager`1' from assembly 'Orleans.Core, Version=2.0.0.0

Open KTazayan opened this issue 8 years ago • 5 comments

I'm getting exception described below when try to use client observers (the simple implementation as described here https://dotnet.github.io/orleans/Documentation/Getting-Started-With-Orleans/Observers.html). System.TypeLoadException: Could not load type 'Orleans.ObserverSubscriptionManager1' from assembly 'Orleans.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. at GrainCollection.Office365PurchaseTransaction.d__2.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at GrainCollection.Office365PurchaseTransaction.OnActivateAsync() at Orleans.Grain.b__31_0(CancellationToken ct) at Orleans.LifecycleExtensions.Observer.OnStart(CancellationToken ct) at Orleans.LifecycleObservable.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Orleans.LifecycleObservable.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Orleans.Runtime.Catalog.d__79.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Orleans.Runtime.Scheduler.AsyncClosureWorkItem.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Orleans.Runtime.Catalog.d__61.MoveNext() info: Orleans.Runtime.Dispatcher[101033]`

I'm using v2.0.0-rc1 version hosted in .NET Core console application. If ObserverSubscriptionManager is obsolete and moved to the legacy package as described here https://github.com/dotnet/orleans/pull/3999 and isn't works correctly with the new version of framework

What approach I should use to be able to use push-based model for notifications from the cluster to the client?

KTazayan avatar Feb 28 '18 15:02 KTazayan

@KTazayan it sounds as though either not all of the assemblies were updated to 2.0.0-rc1 or there's something stale in the build output. Could you double check that everything has been upgraded and then run a full clean and try again?

ReubenBond avatar Feb 28 '18 20:02 ReubenBond

Does look like a version mismatch to me - a project thinks that ObserverSubscriptionManager is in Orleans.Core, where it used to be, while it is actually in Orleans.Core.Legacy now.

sergeybykov avatar Feb 28 '18 21:02 sergeybykov

You are right, after clean and reinstall everything works. Thank you! Also what about the second question. What is the preferred way to organize push-based approach for notifications from the cluster to the client? I mean version 2.0.0 of the framework. I didn't find anything about that from documentation. As I understand ObserverSubscriptionManager is not recommended way for that.

KTazayan avatar Mar 01 '18 07:03 KTazayan

Users generally favor streams for pushing to clients, but either way is fine in my opinion.

ReubenBond avatar Mar 01 '18 10:03 ReubenBond

Ok, thank you.

KTazayan avatar Mar 05 '18 07:03 KTazayan