{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/3","labels_url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/3/comments","events_url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/3/events","html_url":"https://github.com/NuGet/NuGet.BuildTasks/pull/3","id":128886450,"number":3,"title":"Fix framework references removing System reference (NuGet/Home#1880)","user":{"login":"matwilko","id":3772498,"avatar_url":"https://avatars.githubusercontent.com/u/3772498?v=3","gravatar_id":"","url":"https://api.github.com/users/matwilko","html_url":"https://github.com/matwilko","followers_url":"https://api.github.com/users/matwilko/followers","following_url":"https://api.github.com/users/matwilko/following{/other_user}","gists_url":"https://api.github.com/users/matwilko/gists{/gist_id}","starred_url":"https://api.github.com/users/matwilko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matwilko/subscriptions","organizations_url":"https://api.github.com/users/matwilko/orgs","repos_url":"https://api.github.com/users/matwilko/repos","events_url":"https://api.github.com/users/matwilko/events{/privacy}","received_events_url":"https://api.github.com/users/matwilko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/labels/cla-signed","name":"cla-signed","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"jasonmalinowski","id":201340,"avatar_url":"https://avatars.githubusercontent.com/u/201340?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmalinowski","html_url":"https://github.com/jasonmalinowski","followers_url":"https://api.github.com/users/jasonmalinowski/followers","following_url":"https://api.github.com/users/jasonmalinowski/following{/other_user}","gists_url":"https://api.github.com/users/jasonmalinowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmalinowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmalinowski/subscriptions","organizations_url":"https://api.github.com/users/jasonmalinowski/orgs","repos_url":"https://api.github.com/users/jasonmalinowski/repos","events_url":"https://api.github.com/users/jasonmalinowski/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmalinowski/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2016-01-26T17:28:31Z","updated_at":"2016-01-28T20:38:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/pulls/3","html_url":"https://github.com/NuGet/NuGet.BuildTasks/pull/3","diff_url":"https://github.com/NuGet/NuGet.BuildTasks/pull/3.diff","patch_url":"https://github.com/NuGet/NuGet.BuildTasks/pull/3.patch"},"body":"To fix NuGet/Home#1880\r\n\r\nJust been bitten by this bug while trying to move to using csproj and *.project.json together on some projects. Don't know if this is being fixed internally, but thought I would share my solution.\r\n\r\nInstead of trying to detect reference packages in the msbuild target by a heuristic like checking file extensions, which is bound to have subtle edge cases, I've gone the route of explicitly tagging the various references with a metadata flag that indicates whether or not the reference came from resolved package DLLs or from a framework reference, since we know this for certain while in the ResolveNuGetPackageAssets task.\r\n\r\nI've then split out the inclusion of reference and exact references in the MSBuild script, hopefully retaining the exact behaviour as before minus the erroneous reference removal. Unfortunately I couldn't see any way to properly test the MSBuild target in the test project (only the task), and I didn't want to presume to write that kind of thing for such a small bug fix!\r\n\r\nLet me know if more tests are needed, I realise the two I wrote are probably a little thin on the ground."},"comment":{"url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/comments/176403419","html_url":"https://github.com/NuGet/NuGet.BuildTasks/pull/3#issuecomment-176403419","issue_url":"https://api.github.com/repos/NuGet/NuGet.BuildTasks/issues/3","id":176403419,"user":{"login":"matwilko","id":3772498,"avatar_url":"https://avatars.githubusercontent.com/u/3772498?v=3","gravatar_id":"","url":"https://api.github.com/users/matwilko","html_url":"https://github.com/matwilko","followers_url":"https://api.github.com/users/matwilko/followers","following_url":"https://api.github.com/users/matwilko/following{/other_user}","gists_url":"https://api.github.com/users/matwilko/gists{/gist_id}","starred_url":"https://api.github.com/users/matwilko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matwilko/subscriptions","organizations_url":"https://api.github.com/users/matwilko/orgs","repos_url":"https://api.github.com/users/matwilko/repos","events_url":"https://api.github.com/users/matwilko/events{/privacy}","received_events_url":"https://api.github.com/users/matwilko/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T20:38:05Z","updated_at":"2016-01-28T20:38:05Z","body":"Gotta love GitHub sometimes :smile:"}}