{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/corert/issues/5374","repository_url":"https://api.github.com/repos/dotnet/corert","labels_url":"https://api.github.com/repos/dotnet/corert/issues/5374/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/5374/comments","events_url":"https://api.github.com/repos/dotnet/corert/issues/5374/events","html_url":"https://github.com/dotnet/corert/issues/5374","id":296141790,"number":5374,"title":"[Type] is missing structure marshalling data","user":{"login":"qmfrederik","id":9918129,"avatar_url":"https://avatars0.githubusercontent.com/u/9918129?v=4","gravatar_id":"","url":"https://api.github.com/users/qmfrederik","html_url":"https://github.com/qmfrederik","followers_url":"https://api.github.com/users/qmfrederik/followers","following_url":"https://api.github.com/users/qmfrederik/following{/other_user}","gists_url":"https://api.github.com/users/qmfrederik/gists{/gist_id}","starred_url":"https://api.github.com/users/qmfrederik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qmfrederik/subscriptions","organizations_url":"https://api.github.com/users/qmfrederik/orgs","repos_url":"https://api.github.com/users/qmfrederik/repos","events_url":"https://api.github.com/users/qmfrederik/events{/privacy}","received_events_url":"https://api.github.com/users/qmfrederik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-10T22:55:44Z","updated_at":"2018-02-10T22:55:44Z","closed_at":null,"author_association":"NONE","body":"When compiling one of our programs using CoreRT, I get the following runtime exception:\r\n\r\n```\r\nUnhandled Exception: EETypeRva:0x010842E0: [Type] is missing structure marshalling data.\r\n  To enable structure marshalling data, add a MarshalStructure directive to the application rd.xml file.\r\n  For more information, please visit http://go.microsoft.com/fwlink/?LinkID=393965\r\n   at [program]!<BaseAddress>+0x21452e\r\n   at System.Runtime.InteropServices.Marshal.OffsetOf(Type, String) + 0x5e\r\n   at System.Runtime.InteropServices.Marshal.OffsetOf[T](String) + 0x35\r\n```\r\n\r\nHowever, there's a `rd.xml` file  which contains the `MarshalStructure` directive:\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<Directives xmlns=\"http://schemas.microsoft.com/netfx/2013/01/metadata\">\r\n  <Application  >\r\n    <Assembly Name=\"[Assembly]\">\r\n      <Type Name=\"[Type]\" MarshalStructure=\"Required All\"/>\r\n    </Assembly>\r\n  </Application>\r\n</Directives>\r\n```\r\n\r\nI've done some tests to make sure my `rd.xml` file is being picked up - for example, changing the Type name to a non-existing type will cause `dotnet publish` to fail, so it looks like `rd.xml` is being processed correctly.\r\n\r\nI'm referencing `rd.xml` like this in my `.csproj` file:\r\n\r\n```\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.DotNet.ILCompiler\" Version=\"1.0.0-alpha-26210-01\" />\r\n    <RdXmlFile Include=\"rd.xml\" />\r\n  </ItemGroup>\r\n```\r\n\r\nI'd be happy to troubleshoot but not sure where to look next."}}
{"actor":{"display_login":"qmfrederik"}}