{"action":"created","issue":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/315","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/315/comments","events_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/315/events","html_url":"https://github.com/bridgedotnet/Bridge/issues/315","id":95650706,"number":315,"title":"Unable to use Enumerable.Aggregate?","user":{"login":"DanTup","id":1078012,"avatar_url":"https://avatars.githubusercontent.com/u/1078012?v=3","gravatar_id":"","url":"https://api.github.com/users/DanTup","html_url":"https://github.com/DanTup","followers_url":"https://api.github.com/users/DanTup/followers","following_url":"https://api.github.com/users/DanTup/following{/other_user}","gists_url":"https://api.github.com/users/DanTup/gists{/gist_id}","starred_url":"https://api.github.com/users/DanTup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanTup/subscriptions","organizations_url":"https://api.github.com/users/DanTup/orgs","repos_url":"https://api.github.com/users/DanTup/repos","events_url":"https://api.github.com/users/DanTup/events{/privacy}","received_events_url":"https://api.github.com/users/DanTup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bridgedotnet/Bridge/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"vladsch","id":378225,"avatar_url":"https://avatars.githubusercontent.com/u/378225?v=3","gravatar_id":"","url":"https://api.github.com/users/vladsch","html_url":"https://github.com/vladsch","followers_url":"https://api.github.com/users/vladsch/followers","following_url":"https://api.github.com/users/vladsch/following{/other_user}","gists_url":"https://api.github.com/users/vladsch/gists{/gist_id}","starred_url":"https://api.github.com/users/vladsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladsch/subscriptions","organizations_url":"https://api.github.com/users/vladsch/orgs","repos_url":"https://api.github.com/users/vladsch/repos","events_url":"https://api.github.com/users/vladsch/events{/privacy}","received_events_url":"https://api.github.com/users/vladsch/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-17T12:50:37Z","updated_at":"2015-07-20T07:58:34Z","closed_at":null,"body":"I'm porting some Dart code over to Bridge as a test. I had a call to `fold`, which I changed to `Enumerable.Aggregate`, but I get two compile errors.\r\n\r\nCode:\r\n```\r\n// string input;\r\n// Func<char, char, char> scoreChar;\r\ninput.ToUpperCase().Split(\"\").Aggregate(null, scoreChar);\r\n```\r\n\r\nErrors:\r\n\r\n> The type 'Func<,,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n> \r\n> The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n\r\nI can easily change the code; but I'm curious to know if this should work and I'm doing something wrong (I can't add a reference to mscorlib, it says it's added automatically).\r\n\r\nI'm using VS 2015 RC and a Console App targetting .NET 4.5.2 with the NuGet package pulled in."},"comment":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/comments/122790481","html_url":"https://github.com/bridgedotnet/Bridge/issues/315#issuecomment-122790481","issue_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/315","id":122790481,"user":{"login":"DanTup","id":1078012,"avatar_url":"https://avatars.githubusercontent.com/u/1078012?v=3","gravatar_id":"","url":"https://api.github.com/users/DanTup","html_url":"https://github.com/DanTup","followers_url":"https://api.github.com/users/DanTup/followers","following_url":"https://api.github.com/users/DanTup/following{/other_user}","gists_url":"https://api.github.com/users/DanTup/gists{/gist_id}","starred_url":"https://api.github.com/users/DanTup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanTup/subscriptions","organizations_url":"https://api.github.com/users/DanTup/orgs","repos_url":"https://api.github.com/users/DanTup/repos","events_url":"https://api.github.com/users/DanTup/events{/privacy}","received_events_url":"https://api.github.com/users/DanTup/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T07:58:34Z","updated_at":"2015-07-20T07:58:34Z","body":"I did indeed have `using System.Linq` in my code. Without that, the compile error is:\r\n\r\n> 'string[]' does not contain a definition for 'Aggregate' and no extension method 'Aggregate' accepting a first argument of type 'string[]' could be found (are you missing a using directive or an assembly reference?)\r\n\r\nBut with `using System.Linq`, there are these two:\r\n\r\n> The type 'Func<,,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n>\r\n> The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n\r\nNot sure if this might be specific to VS 2015 RC (Roslyn compilers). Here's what I just did to repro in a clean project:\r\n\r\n- Create new Class Library project (C# -> Windows -> Class Library, .NET 4.5.2)\r\n- Add Bridge NuGet package\r\n- Paste in the below code and press build\r\n\r\n```\r\nusing System;\r\nusing System.Linq;\r\n\r\nnamespace A\r\n{\r\n    public class B\r\n    {\r\n\t\tvoid C()\r\n\t\t{\r\n\t\t\tFunc<char, char, char> scoreChar = null;\r\n\t\t\t\"abc\".ToUpper().Split(\"\").Aggregate(null, scoreChar);\r\n\t\t}\r\n\t}\r\n}\r\n```"}}