{"action":"created","issue":{"url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/345","labels_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/345/comments","events_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/345/events","html_url":"https://github.com/fsharp/FSharp.Compiler.Service/pull/345","id":83578744,"number":345,"title":"Add fix for #343 Use ResolveReferences task","user":{"login":"7sharp9","id":588746,"avatar_url":"https://avatars.githubusercontent.com/u/588746?v=3","gravatar_id":"","url":"https://api.github.com/users/7sharp9","html_url":"https://github.com/7sharp9","followers_url":"https://api.github.com/users/7sharp9/followers","following_url":"https://api.github.com/users/7sharp9/following{/other_user}","gists_url":"https://api.github.com/users/7sharp9/gists{/gist_id}","starred_url":"https://api.github.com/users/7sharp9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7sharp9/subscriptions","organizations_url":"https://api.github.com/users/7sharp9/orgs","repos_url":"https://api.github.com/users/7sharp9/repos","events_url":"https://api.github.com/users/7sharp9/events{/privacy}","received_events_url":"https://api.github.com/users/7sharp9/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":45,"created_at":"2015-06-01T16:04:43Z","updated_at":"2015-06-03T15:55:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/pulls/345","html_url":"https://github.com/fsharp/FSharp.Compiler.Service/pull/345","diff_url":"https://github.com/fsharp/FSharp.Compiler.Service/pull/345.diff","patch_url":"https://github.com/fsharp/FSharp.Compiler.Service/pull/345.patch"},"body":"This task seems to stably return the reference list now.\r\nAdded a test using an executable that references a pcl assembly"},"comment":{"url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/comments/108495620","html_url":"https://github.com/fsharp/FSharp.Compiler.Service/pull/345#issuecomment-108495620","issue_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/345","id":108495620,"user":{"login":"rneatherway","id":243995,"avatar_url":"https://avatars.githubusercontent.com/u/243995?v=3","gravatar_id":"","url":"https://api.github.com/users/rneatherway","html_url":"https://github.com/rneatherway","followers_url":"https://api.github.com/users/rneatherway/followers","following_url":"https://api.github.com/users/rneatherway/following{/other_user}","gists_url":"https://api.github.com/users/rneatherway/gists{/gist_id}","starred_url":"https://api.github.com/users/rneatherway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rneatherway/subscriptions","organizations_url":"https://api.github.com/users/rneatherway/orgs","repos_url":"https://api.github.com/users/rneatherway/repos","events_url":"https://api.github.com/users/rneatherway/events{/privacy}","received_events_url":"https://api.github.com/users/rneatherway/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T15:55:12Z","updated_at":"2015-06-03T15:55:12Z","body":"Hi Don, well it took a lot of effort, but I think it is a unquestioned improvement. The headline is that we are using the target `ResolveReferences` rather than the old `ResolveAssemblyReferences; ImplicitlyExpandTargetFramework`. This should run all the same tasks that the build would run, rather than hackishly adding extra targets ourselves. One such is `ResolveProjectReferences`, which prevents us having to recurse on the projects manually. However, it then actually tries to build the referenced projects, because that is how `Microsoft.Common.targets` works *unless* you set the property \"BuildingInsideVisualStudio\" to \"true\". So I've done that. This should be much more robust.\r\n\r\nHowever, there are two outstanding issues:\r\n\r\n1. The sqlite test (project referencing a PCL-using DLL) doesn't pass on Windows. To debug that I need to see the `LogOutput` from FCS compared to `msbuild /v:diag` on Windows. I think it may be a ToolsVersion issue, see '2'.\r\n\r\n2. The ToolsVersion and MSBuild version assembly issue.\r\n    a) On Windows, using MSBuild v4 causes many tests to fail, presumably the 'New API' is not well supported if at all in those assemblies.\r\n    b) Generally, using MSBuild v12 causes Websharper/Android/custom Tasks that inherit from MSBuild v4 Task (e.g. #342 and #294) to fail with an InvalidCastException. We could try, although I haven't yet, using a binding redirect e.g. on FSharp.AutoComplete as Xbuild v12 does. However, xbuild doesn't use a binding redirect for `Microsoft.Build.Tasks.vXX.dll` and I don't see how that could work because the assemblies have different names. So I'm thinking that perhaps we are not setting the engine/project `ToolsVersion` correctly.\r\n\r\nI'm concerned that we are possibly setting ourselves an impossible task in having a single version of FCS that works for all projects and installed versions of MSBuild. Both xbuild and the Visual F# VS integration use conditional compilation and thus assume that a particular instance of MSBuild is present. Perhaps @tpetricek's plan to bundle a particular version, which aligns with this model, is actually wise.\r\n\r\nI have noticed that the Visual F# VS integration invokes the target `Compile` and only falls back to `ResolveReferences`: https://github.com/Microsoft/visualfsharp/blob/fsharp4/vsintegration/src/Salsa/salsa.fs#L223\r\n"}}