{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/30323","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/30323/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/30323/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/30323/events","html_url":"https://github.com/dotnet/corefx/issues/30323","id":331662481,"node_id":"MDU6SXNzdWUzMzE2NjI0ODE=","number":30323,"title":"Question: How to integrate IL code properly in a dotnet core C# project?","user":{"login":"fredpointzero","id":1635937,"node_id":"MDQ6VXNlcjE2MzU5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1635937?v=4","gravatar_id":"","url":"https://api.github.com/users/fredpointzero","html_url":"https://github.com/fredpointzero","followers_url":"https://api.github.com/users/fredpointzero/followers","following_url":"https://api.github.com/users/fredpointzero/following{/other_user}","gists_url":"https://api.github.com/users/fredpointzero/gists{/gist_id}","starred_url":"https://api.github.com/users/fredpointzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredpointzero/subscriptions","organizations_url":"https://api.github.com/users/fredpointzero/orgs","repos_url":"https://api.github.com/users/fredpointzero/repos","events_url":"https://api.github.com/users/fredpointzero/events{/privacy}","received_events_url":"https://api.github.com/users/fredpointzero/received_events","type":"User","site_admin":false},"labels":[{"id":158885797,"node_id":"MDU6TGFiZWwxNTg4ODU3OTc=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-Meta","name":"area-Meta","color":"d4c5f9","default":false},{"id":309869280,"node_id":"MDU6TGFiZWwzMDk4NjkyODA=","url":"https://api.github.com/repos/dotnet/corefx/labels/question","name":"question","color":"207de5","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"node_id":"MDk6TWlsZXN0b25lMTMyODA4MA==","number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"node_id":"MDQ6VXNlcjEzMDI4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","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":1934,"closed_issues":188,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-06-18T07:13:09Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-06-12T16:27:40Z","updated_at":"2018-06-18T07:47:44Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI want to implement some methods in my C# project directly with IL code.\r\n\r\nWhile reading the implementation of System.Runtime.CompilerServices.Unsafe, I noticed that the actual implementation is using IL source file and class definition in C#, but I missed some steps.\r\n\r\nI have two questions about this:\r\n\r\n1. How do you get properly ilasm executable in a Visual Studio dotnet core app project?\r\nSo far, I downloaded the nuget package runtime.win-x64.Microsoft.NETCore.ILAsm manually, extracted ilasm.exe and copied the corresponding coreclr.dll in a folder.\r\n\r\nThis work but it is not a resilient way to get it.\r\n\r\n2. What is the build pipeline to include the IL code?\r\nI successfully created a dll assembly from my il source code file, but I do not know how to properly inject it in the C# project's dll.\r\nIn the corefx and buildtool repository, I found the MSBuild targets to build the IL source code into dll but not how the IL code is injected in the final assembly.\r\n\r\n\r\nBest regards,\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/397969468","html_url":"https://github.com/dotnet/corefx/issues/30323#issuecomment-397969468","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/30323","id":397969468,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Nzk2OTQ2OA==","user":{"login":"fredpointzero","id":1635937,"node_id":"MDQ6VXNlcjE2MzU5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1635937?v=4","gravatar_id":"","url":"https://api.github.com/users/fredpointzero","html_url":"https://github.com/fredpointzero","followers_url":"https://api.github.com/users/fredpointzero/followers","following_url":"https://api.github.com/users/fredpointzero/following{/other_user}","gists_url":"https://api.github.com/users/fredpointzero/gists{/gist_id}","starred_url":"https://api.github.com/users/fredpointzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredpointzero/subscriptions","organizations_url":"https://api.github.com/users/fredpointzero/orgs","repos_url":"https://api.github.com/users/fredpointzero/repos","events_url":"https://api.github.com/users/fredpointzero/events{/privacy}","received_events_url":"https://api.github.com/users/fredpointzero/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T07:47:44Z","updated_at":"2018-06-18T07:47:44Z","author_association":"NONE","body":"I tried InlineIL.Fody and a custom solution to weave IL assemblies with raw IL files but InlineIL.Fody is more convenenient to use (and already update the debug info).\r\n\r\nHowever, it is a bit difficult to debug when the IL code is incorrect. I am currently using Visual Studio's debugger with the asm view. Maybe you have some experience in debugging IL @omariom ?"}}
{"actor":{"display_login":"fredpointzero"}}