{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/128","labels_url":"https://api.github.com/repos/Microsoft/msbuild/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msbuild/issues/128/comments","events_url":"https://api.github.com/repos/Microsoft/msbuild/issues/128/events","html_url":"https://github.com/Microsoft/msbuild/pull/128","id":94728009,"number":128,"title":"[xaml] TaskParser.Parse: Handle detection of content or file on Unix.","user":{"login":"radical","id":1472,"avatar_url":"https://avatars.githubusercontent.com/u/1472?v=3","gravatar_id":"","url":"https://api.github.com/users/radical","html_url":"https://github.com/radical","followers_url":"https://api.github.com/users/radical/followers","following_url":"https://api.github.com/users/radical/following{/other_user}","gists_url":"https://api.github.com/users/radical/gists{/gist_id}","starred_url":"https://api.github.com/users/radical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radical/subscriptions","organizations_url":"https://api.github.com/users/radical/orgs","repos_url":"https://api.github.com/users/radical/repos","events_url":"https://api.github.com/users/radical/events{/privacy}","received_events_url":"https://api.github.com/users/radical/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/msbuild/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-13T14:01:26Z","updated_at":"2015-08-19T05:48:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/msbuild/pulls/128","html_url":"https://github.com/Microsoft/msbuild/pull/128","diff_url":"https://github.com/Microsoft/msbuild/pull/128.diff","patch_url":"https://github.com/Microsoft/msbuild/pull/128.patch"},"body":"TaskParser.Parse(string contentOrFile, string)\r\n.. first argument can either be a filename or xaml string. Existing\r\ncode depended on Path.GetFullPath returning null for xml string, for\r\nthis detection. But on Unix, xml string could be a valid file path.\r\n\r\nSo, instead we utilize the knowledge that:\r\n\r\nOn Windows:\r\n- xml string will be an invalid file path, so, Path.GetFullPath will\r\n  return null\r\n- xml string cannot be a rooted path (\"C:\\\\<abc />\")\r\n\r\nOn Unix:\r\n- xml string is a valid path, this is not useful as Path.GetFullPath\r\n  will return !null in most cases\r\n- xml string cannot be a rooted path (\"/foo/<abc />\")\r\n\r\nWe have an additional check for rooted paths, just to be able to throw\r\nthe correct error in case of:\r\n- Unix, @contentOrFile being a non-existant file path\r\nAn additional test is added for this code path.\r\n\r\nThis fixes all the XamlTaskFactory tests on Unix."},"comment":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/comments/132453798","html_url":"https://github.com/Microsoft/msbuild/pull/128#issuecomment-132453798","issue_url":"https://api.github.com/repos/Microsoft/msbuild/issues/128","id":132453798,"user":{"login":"jasonwilliams200OK","id":2031765,"avatar_url":"https://avatars.githubusercontent.com/u/2031765?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonwilliams200OK","html_url":"https://github.com/jasonwilliams200OK","followers_url":"https://api.github.com/users/jasonwilliams200OK/followers","following_url":"https://api.github.com/users/jasonwilliams200OK/following{/other_user}","gists_url":"https://api.github.com/users/jasonwilliams200OK/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonwilliams200OK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonwilliams200OK/subscriptions","organizations_url":"https://api.github.com/users/jasonwilliams200OK/orgs","repos_url":"https://api.github.com/users/jasonwilliams200OK/repos","events_url":"https://api.github.com/users/jasonwilliams200OK/events{/privacy}","received_events_url":"https://api.github.com/users/jasonwilliams200OK/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T05:48:25Z","updated_at":"2015-08-19T05:48:25Z","body":"@ValMenn, if this and #133 are good, should these be merged?"}}