Tag Archives: exceptions

How to reuse lambda parameter across multiple combined expressions

If you’re having multiple separately defined expressions having common lambda parameter like these: And trying to combine them into one and to reuse the said parameter like this: Then you’ll likely get an exception: Unhandled Exception: System.InvalidOperationException: variable ‘u’ of … Continue reading

Posted in Programming | Tagged , | Leave a comment

The ObjectContext instance has been disposed and can no longer be used for operations that require a connection

TL;DR: Don’t return task before disposing context, await it instead If you’re getting an Entity Framework exception: System.ObjectDisposedException: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection at System.Data.Entity.Core.Objects.ObjectContext.ReleaseConnection() at System.Data.Entity.Core.Objects.ObjectContext.d__3d`1.MoveNext() … Continue reading

Posted in Programming | Tagged , | Leave a comment

Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference

TL;DR: Add reference to Newtonsoft.Json.dll in every project If you’re getting a runtime exception: System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly … Continue reading

Posted in Programming | Tagged | Leave a comment

Could not load file or assembly ‘Microsoft.AnalysisServices, Version=11.0.0.0

If you’re getting the following error upgrading TFS 2012 RTM to ver. 2012.3: TF255356: The following error occurred when configuring the Team Foundation databases: TF400711: Error occurred while executing servicing step Upgrade Warehouse for component UpdateWarehouseVersion during FinishInstallUpdates: Could not … Continue reading

Posted in Infrastructure | Tagged , , | Leave a comment