{"action":"created","issue":{"url":"https://api.github.com/repos/mono/monodevelop/issues/2391","repository_url":"https://api.github.com/repos/mono/monodevelop","labels_url":"https://api.github.com/repos/mono/monodevelop/issues/2391/labels{/name}","comments_url":"https://api.github.com/repos/mono/monodevelop/issues/2391/comments","events_url":"https://api.github.com/repos/mono/monodevelop/issues/2391/events","html_url":"https://github.com/mono/monodevelop/pull/2391","id":227194175,"number":2391,"title":"Initial work to support SDK resolvers","user":{"login":"slluis","id":260349,"avatar_url":"https://avatars1.githubusercontent.com/u/260349?v=3","gravatar_id":"","url":"https://api.github.com/users/slluis","html_url":"https://github.com/slluis","followers_url":"https://api.github.com/users/slluis/followers","following_url":"https://api.github.com/users/slluis/following{/other_user}","gists_url":"https://api.github.com/users/slluis/gists{/gist_id}","starred_url":"https://api.github.com/users/slluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slluis/subscriptions","organizations_url":"https://api.github.com/users/slluis/orgs","repos_url":"https://api.github.com/users/slluis/repos","events_url":"https://api.github.com/users/slluis/events{/privacy}","received_events_url":"https://api.github.com/users/slluis/received_events","type":"User","site_admin":false},"labels":[{"id":389247867,"url":"https://api.github.com/repos/mono/monodevelop/labels/DON'T%20MERGE%20YET","name":"DON'T MERGE YET","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-08T22:31:20Z","updated_at":"2017-05-09T01:31:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mono/monodevelop/pulls/2391","html_url":"https://github.com/mono/monodevelop/pull/2391","diff_url":"https://github.com/mono/monodevelop/pull/2391.diff","patch_url":"https://github.com/mono/monodevelop/pull/2391.patch"},"body":"Changes done so far:\r\n* MD.Core now references the MSBuild assemblies from the msbuild dir. The assemblies need to be explicitly loaded since they are not in the gac.\r\n* I copied SdkResolution.cs and related files from MSBuild and adapted it to MD. Paths in BuildEnvironmentHelper are harcoded, that needs to be fixed.\r\n* DefaultMSBuildEngine now gets the sdk path from SdkResolution. This is working correctly.\r\n* I commented out the line that sets the value of MSBuildSDKsPath as an env var in ProjectBuilder.v4.0.cs. If that env var is not defined, MSBuild should be using the resolvers to find the SDKs, but this is not working, resolvers are not found.\r\n\r\nWe can't merge this because the last bit doesn't work, and builds fail. This could be because MD loads the msbuild libraries from a temp directory."},"comment":{"url":"https://api.github.com/repos/mono/monodevelop/issues/comments/300036246","html_url":"https://github.com/mono/monodevelop/pull/2391#issuecomment-300036246","issue_url":"https://api.github.com/repos/mono/monodevelop/issues/2391","id":300036246,"user":{"login":"radical","id":1472,"avatar_url":"https://avatars3.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},"created_at":"2017-05-09T01:31:45Z","updated_at":"2017-05-09T01:31:45Z","body":"The first issue is that msbuild is looking for `SdkResolvers/` next to the other assemblies in the builder directory. Copying that over (https://gist.github.com/radical/bdc824ceafddb36c162805fdee7144cd) gets to the next issue:\r\n```\r\nMono: DllImport error loading library '/Users/ankit/Library/Caches/MonoDevelop/7.0/MSBuild/3303_1/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib': 'dlopen(/Users/ankit/Library/Caches/MonoDevelop/7.0/MSBuild/3303_1/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib, 9): no suitable image found.  Did find:\r\n        /Users/ankit/Library/Caches/MonoDevelop/7.0/MSBuild/3303_1/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib: mach-o, but wrong architecture\r\n```\r\n\r\nIt's a 64bit library and the builder is being run with `mono32`, which is because of https://github.com/mono/monodevelop/blob/master/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs#L350-L351 .\r\n```\r\n\t\t\tif ((peKind & (IKVM.Reflection.PortableExecutableKinds.Required32Bit | IKVM.Reflection.PortableExecutableKinds.Preferred32Bit)) != 0) {\r\n\t\t\t\tmonoPath = Path.Combine (MonoRuntimeInfo.Prefix, \"bin\", \"mono32\");\r\n```\r\n\r\nSwitching the builder to be built for x64, fixes the above issue and I don't get any error about not being able to find a SDK. But I'm not sure whether we should switch\r\nthe builder to 64bit, at this last moment."}}
{"actor":{"display_login":"radical"}}