{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/7520","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/7520/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7520/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/7520/events","html_url":"https://github.com/dotnet/corefx/issues/7520","id":146058406,"number":7520,"title":"How to use Reflection over .net core libraries?","user":{"login":"rposener","id":1682573,"avatar_url":"https://avatars.githubusercontent.com/u/1682573?v=3","gravatar_id":"","url":"https://api.github.com/users/rposener","html_url":"https://github.com/rposener","followers_url":"https://api.github.com/users/rposener/followers","following_url":"https://api.github.com/users/rposener/following{/other_user}","gists_url":"https://api.github.com/users/rposener/gists{/gist_id}","starred_url":"https://api.github.com/users/rposener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rposener/subscriptions","organizations_url":"https://api.github.com/users/rposener/orgs","repos_url":"https://api.github.com/users/rposener/repos","events_url":"https://api.github.com/users/rposener/events{/privacy}","received_events_url":"https://api.github.com/users/rposener/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/question","name":"question","color":"207de5"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Reflection","name":"System.Reflection","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"AtsushiKan","id":13223578,"avatar_url":"https://avatars.githubusercontent.com/u/13223578?v=3","gravatar_id":"","url":"https://api.github.com/users/AtsushiKan","html_url":"https://github.com/AtsushiKan","followers_url":"https://api.github.com/users/AtsushiKan/followers","following_url":"https://api.github.com/users/AtsushiKan/following{/other_user}","gists_url":"https://api.github.com/users/AtsushiKan/gists{/gist_id}","starred_url":"https://api.github.com/users/AtsushiKan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtsushiKan/subscriptions","organizations_url":"https://api.github.com/users/AtsushiKan/orgs","repos_url":"https://api.github.com/users/AtsushiKan/repos","events_url":"https://api.github.com/users/AtsushiKan/events{/privacy}","received_events_url":"https://api.github.com/users/AtsushiKan/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rtm","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"1.0.0-rtm","description":"2016 https://github.com/aspnet/Home/wiki/Roadmap","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":343,"closed_issues":584,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2016-04-20T17:22:44Z","due_on":"2016-06-30T07:00:00Z","closed_at":null},"comments":2,"created_at":"2016-04-05T17:39:57Z","updated_at":"2016-04-20T17:38:39Z","closed_at":null,"body":"It is not clear how to properly use reflection over .net core libraries.  When trying to use T4 template to reflect over a class library (we do this to generate Typescript definition files of our Dto's.  The  way we have always done this and expected it to work is the following a simple template:\r\n````\r\n<#@ template debug=\"false\" language=\"C#\" #>\r\n<#@ assembly name=\"System.Core\" #>\r\n<#@ assembly name=\"System.Collections\" #>\r\n<#@ assembly name=\"System.Linq\" #>\r\n<#@ assembly name=\"$(SolutionDir)\\srcCore\\CM.Dtos\\bin\\Debug\\dnx451\\CM.Dtos.dll\" #>\r\n<#@ import namespace=\"System\" #>\r\n<#@ import namespace=\"System.Linq\" #>\r\n<#@ import namespace=\"System.Reflection\" #>\r\n<#@ import namespace=\"System.Collections.Generic\" #>\r\n<#@ output extension=\".d.ts\" #>\r\n<#\r\n\r\n\tvar assembly = Assembly.GetAssembly(typeof(CM.Dtos.PagedRequest));\r\n\tvar allTypes = assembly.GetTypes().ToList();\r\n\r\n`````\r\n\r\nthis does not seem to work with dnx/core libraries as we expected.  How would one crack open library the correct way to reflect over it's classes?"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/212529736","html_url":"https://github.com/dotnet/corefx/issues/7520#issuecomment-212529736","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/7520","id":212529736,"user":{"login":"rposener","id":1682573,"avatar_url":"https://avatars.githubusercontent.com/u/1682573?v=3","gravatar_id":"","url":"https://api.github.com/users/rposener","html_url":"https://github.com/rposener","followers_url":"https://api.github.com/users/rposener/followers","following_url":"https://api.github.com/users/rposener/following{/other_user}","gists_url":"https://api.github.com/users/rposener/gists{/gist_id}","starred_url":"https://api.github.com/users/rposener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rposener/subscriptions","organizations_url":"https://api.github.com/users/rposener/orgs","repos_url":"https://api.github.com/users/rposener/repos","events_url":"https://api.github.com/users/rposener/events{/privacy}","received_events_url":"https://api.github.com/users/rposener/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T17:38:39Z","updated_at":"2016-04-20T17:38:39Z","body":"So, when running from VS, when you choose \"Run Custom Tool\" - what is really happening?  Is it using .net core app?  I would have believed it to be the old T4 execution.  If so, is there any way the old tool can reflect over the new core packages?  Is there a way to execute a .net core console app or something in the Task Runner as part of our build process instead so these suggestions will work?"}}