{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/4186","repository_url":"https://api.github.com/repos/dotnet/orleans","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/4186/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/4186/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/4186/events","html_url":"https://github.com/dotnet/orleans/issues/4186","id":304291571,"number":4186,"title":"Problems using `Microsoft.Orleans.TestingHost` in a separate .NET Core console app","user":{"login":"alexandrnikitin","id":1798438,"avatar_url":"https://avatars0.githubusercontent.com/u/1798438?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandrnikitin","html_url":"https://github.com/alexandrnikitin","followers_url":"https://api.github.com/users/alexandrnikitin/followers","following_url":"https://api.github.com/users/alexandrnikitin/following{/other_user}","gists_url":"https://api.github.com/users/alexandrnikitin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrnikitin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrnikitin/subscriptions","organizations_url":"https://api.github.com/users/alexandrnikitin/orgs","repos_url":"https://api.github.com/users/alexandrnikitin/repos","events_url":"https://api.github.com/users/alexandrnikitin/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrnikitin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"assignees":[{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/orleans/milestones/17","html_url":"https://github.com/dotnet/orleans/milestone/17","labels_url":"https://api.github.com/repos/dotnet/orleans/milestones/17/labels","id":2111063,"number":17,"title":"Triage","description":"","creator":{"login":"sergeybykov","id":8248806,"avatar_url":"https://avatars1.githubusercontent.com/u/8248806?v=4","gravatar_id":"","url":"https://api.github.com/users/sergeybykov","html_url":"https://github.com/sergeybykov","followers_url":"https://api.github.com/users/sergeybykov/followers","following_url":"https://api.github.com/users/sergeybykov/following{/other_user}","gists_url":"https://api.github.com/users/sergeybykov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeybykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeybykov/subscriptions","organizations_url":"https://api.github.com/users/sergeybykov/orgs","repos_url":"https://api.github.com/users/sergeybykov/repos","events_url":"https://api.github.com/users/sergeybykov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeybykov/received_events","type":"User","site_admin":false},"open_issues":47,"closed_issues":341,"state":"open","created_at":"2016-11-03T00:53:47Z","updated_at":"2018-03-12T16:30:43Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-03-12T09:17:55Z","updated_at":"2018-03-12T16:33:05Z","closed_at":"2018-03-12T16:30:43Z","author_association":"NONE","body":"I want to use the Test Cluster in a separate console app, so I create one and reference the latest `2.0.0-rc1` `Microsoft.Orleans.TestingHost`.\r\n\r\n```\r\n<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <OutputType>Exe</OutputType>\r\n    <TargetFramework>netcoreapp2.0</TargetFramework>\r\n    <RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.Orleans.TestingHost\" Version=\"2.0.0-rc1\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n\r\n```\r\n\r\n```\r\nusing Orleans.TestingHost;\r\n\r\nnamespace ConsoleApp1\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            var host = new TestClusterBuilder(1).Build();\r\n            host.Deploy();\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nLaunching it throws the following exception:\r\n\r\n```\r\nUnhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.\r\n```\r\n\r\nI install the latest `2.1.0-preview1-final` `Microsoft.Extensions.Configuration.Binder` package (which is referenced by `Microsoft.Orleans.TestingHost`)\r\n```\r\n    <PackageReference Include=\"Microsoft.Extensions.Configuration.Binder\" Version=\"2.1.0-preview1-final\" />\r\n```\r\n\r\nThen it throws this:\r\n\r\n```\r\nUnhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Orleans.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\r\n```\r\n\r\nI install all direct latest dependencies of `Microsoft.Orleans.TestingHost`\r\n\r\n```\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.Extensions.Configuration.Binder\" Version=\"2.1.0-preview1-final\" />\r\n    <PackageReference Include=\"Microsoft.Orleans.Core\" Version=\"2.0.0-rc1\" />\r\n    <PackageReference Include=\"Microsoft.Orleans.OrleansProviders\" Version=\"2.0.0-rc1\" />\r\n    <PackageReference Include=\"Microsoft.Orleans.OrleansRuntime\" Version=\"2.0.0-rc1\" />\r\n    <PackageReference Include=\"Microsoft.Orleans.TestingHost\" Version=\"2.0.0-rc1\" />\r\n  </ItemGroup>\r\n\r\n```\r\nIt prints starting messages and throws `System.TypeLoadException`:\r\n\r\n```\r\n----------------------------- STARTING NEW UNIT TEST SILO HOST: Orleans.TestingHost.TestCluster -------------------------------------\r\nStarting a new silo in app domain Primary\r\n\r\n\r\nUnhandled Exception: System.TypeLoadException: Could not load type 'System.AppDomainSetup' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n```\r\n\r\nThe same happens if I have references to Grain interfaces and Grains library projects from that console app. What am I doing wrong?"},"comment":{"url":"https://api.github.com/repos/dotnet/orleans/issues/comments/372374252","html_url":"https://github.com/dotnet/orleans/issues/4186#issuecomment-372374252","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/4186","id":372374252,"user":{"login":"alexandrnikitin","id":1798438,"avatar_url":"https://avatars0.githubusercontent.com/u/1798438?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandrnikitin","html_url":"https://github.com/alexandrnikitin","followers_url":"https://api.github.com/users/alexandrnikitin/followers","following_url":"https://api.github.com/users/alexandrnikitin/following{/other_user}","gists_url":"https://api.github.com/users/alexandrnikitin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrnikitin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrnikitin/subscriptions","organizations_url":"https://api.github.com/users/alexandrnikitin/orgs","repos_url":"https://api.github.com/users/alexandrnikitin/repos","events_url":"https://api.github.com/users/alexandrnikitin/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrnikitin/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T16:33:05Z","updated_at":"2018-03-12T16:33:05Z","author_association":"NONE","body":"Issue to track: #3032"}}
{"actor":{"display_login":"alexandrnikitin"}}