{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/772","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/772/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/772/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/772","id":183809065,"number":772,"title":"Adding Microsoft.Azure.WebJobs.ServiceBus to built in assemblies","user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-18T21:33:46Z","updated_at":"2016-10-18T22:49:38Z","closed_at":"2016-10-18T22:49:38Z","pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/772","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/772","diff_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/772.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/772.patch"},"body":"This issue came up in a recent customer query, where they're trying to use Binder to do dynamic bindings (see code below). To use `Binder` for dynamic bindings, you need to reference the associated attribute (e.g. ServiceBusAttribute). The below full assembly path reference is a workaround - no `#r` should be needed at all.\r\n\r\nI've verified with this change that the below function works w/o the `#r`. I also verified that we're good with all the other assemblies. We have logic [here](https://github.com/Azure/azure-webjobs-sdk-script/blob/dev/src/WebJobs.Script/Description/DotNet/ExtensionSharedAssemblyProvider.cs#L38) to automatically add the extension assembly, but ServiceBus is a special case, since its ScriptBindingProvider lives in this repo, not in core SDK.\r\n\r\n```csharp\r\n#r \"D:\\Program Files (x86)\\SiteExtensions\\Functions\\0.6.10487\\bin\\Microsoft.Azure.WebJobs.ServiceBus.dll\"\r\n\r\nusing System;\r\nusing Microsoft.Azure.WebJobs;\r\n\r\npublic static async Task Run(string input, Binder binder, TraceWriter log)\r\n{\r\n    log.Info($\"C# manually triggered function called with input: {input}\");\r\n\r\n    var attributes = new Attribute[]\r\n    {\r\n        new ServiceBusAttribute(\"myqueue\")\r\n    };\r\n\r\n    var collector = await binder.BindAsync<IAsyncCollector<string>>(attributes);\r\n    await collector.AddAsync(input);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments/254661960","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/772#issuecomment-254661960","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/772","id":254661960,"user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T22:49:38Z","updated_at":"2016-10-18T22:49:38Z","body":"Merged"}}
{"actor":{"display_login":"mathewc"}}