{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2440","repository_url":"https://api.github.com/repos/Azure/azure-functions-host","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2440/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2440/comments","events_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2440/events","html_url":"https://github.com/Azure/azure-functions-host/issues/2440","id":299045291,"node_id":"MDU6SXNzdWUyOTkwNDUyOTE=","number":2440,"title":"System.IO.FileLoadException when running function (\"Microsoft.IdentityModel.Tokens\")","user":{"login":"craig006","id":23329523,"node_id":"MDQ6VXNlcjIzMzI5NTIz","avatar_url":"https://avatars0.githubusercontent.com/u/23329523?v=4","gravatar_id":"","url":"https://api.github.com/users/craig006","html_url":"https://github.com/craig006","followers_url":"https://api.github.com/users/craig006/followers","following_url":"https://api.github.com/users/craig006/following{/other_user}","gists_url":"https://api.github.com/users/craig006/gists{/gist_id}","starred_url":"https://api.github.com/users/craig006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig006/subscriptions","organizations_url":"https://api.github.com/users/craig006/orgs","repos_url":"https://api.github.com/users/craig006/repos","events_url":"https://api.github.com/users/craig006/events{/privacy}","received_events_url":"https://api.github.com/users/craig006/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"fabiocav","id":2507935,"node_id":"MDQ6VXNlcjI1MDc5MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2507935?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"assignees":[{"login":"fabiocav","id":2507935,"node_id":"MDQ6VXNlcjI1MDc5MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2507935?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/49","html_url":"https://github.com/Azure/azure-functions-host/milestone/49","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/49/labels","id":3315573,"node_id":"MDk6TWlsZXN0b25lMzMxNTU3Mw==","number":49,"title":"Sprint 24","description":"","creator":{"login":"paulbatum","id":10663,"node_id":"MDQ6VXNlcjEwNjYz","avatar_url":"https://avatars2.githubusercontent.com/u/10663?v=4","gravatar_id":"","url":"https://api.github.com/users/paulbatum","html_url":"https://github.com/paulbatum","followers_url":"https://api.github.com/users/paulbatum/followers","following_url":"https://api.github.com/users/paulbatum/following{/other_user}","gists_url":"https://api.github.com/users/paulbatum/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbatum/subscriptions","organizations_url":"https://api.github.com/users/paulbatum/orgs","repos_url":"https://api.github.com/users/paulbatum/repos","events_url":"https://api.github.com/users/paulbatum/events{/privacy}","received_events_url":"https://api.github.com/users/paulbatum/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":3,"state":"open","created_at":"2018-05-02T17:44:00Z","updated_at":"2018-05-30T17:57:45Z","due_on":"2018-05-30T07:00:00Z","closed_at":null},"comments":8,"created_at":"2018-02-21T16:47:36Z","updated_at":"2018-05-30T17:57:45Z","closed_at":"2018-05-30T17:57:45Z","author_association":"NONE","body":"Invocation ID: 4a8b83e2-2ad0-4f70-a13b-c41295cf6f17\r\nTimestamp: 2018-02-21T16:25:54.224\r\nFunction App version (1.0 or 2.0-beta): 2.0-beta\r\n\r\n#### Repro steps\r\n\r\nCreate a .net core project that contains the function to run.\r\n\r\nAdd package reference to project like below:\r\n`<PackageReference Include=\"Microsoft.IdentityModel.Tokens\" Version=\"5.2.1\" />`\r\n\r\nCall a method that uses the above package and its dependancies. \r\n\r\n<details>\r\n<summary>Example method</summary>\r\n\r\n```csharp\r\npublic string CreateJWTToken(ClaimsIdentity identity)\r\n{\r\n    string _algorithm = \"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256\";\r\n    string _digest = \"http://www.w3.org/2001/04/xmlenc#sha256\";\r\n    var symmetricKey = Encoding.UTF8.GetBytes(\"<somekey>\");\r\n    var securityKey = new SymmetricSecurityKey(symmetricKey);\r\n    var credentials = new SigningCredentials(securityKey, _algorithm, _digest);\r\n\r\n    var tokenDescriptor = new SecurityTokenDescriptor();\r\n    tokenDescriptor.Subject = identity;\r\n    tokenDescriptor.Issuer = \"\";\r\n    tokenDescriptor.Audience = \"\";\r\n    tokenDescriptor.SigningCredentials = credentials;\r\n\r\n    var tokenHandler = new JwtSecurityTokenHandler();\r\n    var token = tokenHandler.CreateToken(tokenDescriptor);\r\n    return tokenHandler.WriteToken(token);\r\n}\r\n```\r\n</details>\r\n\r\n#### Expected behavior\r\n\r\nAssembly resolved and jwt token created successfully\r\n\r\n#### Actual behavior\r\n\r\nException is thrown:\r\nSystem.IO.FileLoadException\r\n\r\nCould not load file or assembly 'Microsoft.IdentityModel.Tokens, Version=5.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\r\n\r\n\r\n#### Known workarounds\r\nNone\r\n\r\n#### Related information \r\n\r\n1. This fails both on my local functions host and when running in Azure. \r\n2. I have inspected the bin folder in both cases and the assembly exists there right along side my application dll.\r\n3. I have tried to recreate in a .net core console app and all work well there.\r\n\r\nProvide any related information \r\n\r\n* Programming language used \r\nC#\r\n\r\n<details>\r\n<summary>Binding</summary>\r\n\r\n```json\r\n{\r\n  \"generatedBy\": \"Microsoft.NET.Sdk.Functions.Generator-1.0.8\",\r\n  \"configurationSource\": \"attributes\",\r\n  \"bindings\": [\r\n    {\r\n      \"type\": \"httpTrigger\",\r\n      \"route\": \"Authenticate\",\r\n      \"methods\": [\r\n        \"post\"\r\n      ],\r\n      \"authLevel\": \"anonymous\",\r\n      \"name\": \"request\"\r\n    }\r\n  ],\r\n  \"disabled\": false,\r\n  \"scriptFile\": \"../bin/MyProject.dll\",\r\n  \"entryPoint\": \"MyProject.Functions.AuthenticateFunction.Run\"\r\n}\r\n```\r\n</details>\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/comments/393258609","html_url":"https://github.com/Azure/azure-functions-host/issues/2440#issuecomment-393258609","issue_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2440","id":393258609,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzI1ODYwOQ==","user":{"login":"fabiocav","id":2507935,"node_id":"MDQ6VXNlcjI1MDc5MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2507935?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T17:57:45Z","updated_at":"2018-05-30T17:57:45Z","author_association":"MEMBER","body":"As mentioned. Work is in progress and fixes will be deployed with the next release. Leaving this open and moving to Sprint 25 for validation"}}
{"actor":{"display_login":"fabiocav"}}