dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.07k stars 2.03k forks source link

[1.5.2] Error upgrading to Orleans 1.5.2 - 'IServiceProvider' defined in assembly that isn't referenced #4459

Closed Eldar1205 closed 6 years ago

Eldar1205 commented 6 years ago

My service currently runs with Orleans 1.2.3 and .Net framework 4.6.2, and I wish to upgrade it to Orleans 1.5.2. After doing so, I got this error in the DI startup type, when calling IServiceCollection.BuildServices() extension method:

error CS0012: The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

This also happens to a new service we work on that starts with Orleans 1.5.2. We are stuck on this, can you please assist?

Eldar1205 commented 6 years ago

Update: Fixed by adding to .csproj, may help others