{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/996","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/996/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/996/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/996/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/996","id":192047174,"number":996,"title":"CLI: Function compilation error (C#)","user":{"login":"arafato","id":4450859,"avatar_url":"https://avatars.githubusercontent.com/u/4450859?v=3","gravatar_id":"","url":"https://api.github.com/users/arafato","html_url":"https://github.com/arafato","followers_url":"https://api.github.com/users/arafato/followers","following_url":"https://api.github.com/users/arafato/following{/other_user}","gists_url":"https://api.github.com/users/arafato/gists{/gist_id}","starred_url":"https://api.github.com/users/arafato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arafato/subscriptions","organizations_url":"https://api.github.com/users/arafato/orgs","repos_url":"https://api.github.com/users/arafato/repos","events_url":"https://api.github.com/users/arafato/events{/privacy}","received_events_url":"https://api.github.com/users/arafato/received_events","type":"User","site_admin":false},"labels":[{"id":413955731,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels/CLI","name":"CLI","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-28T16:13:16Z","updated_at":"2016-11-29T23:11:44Z","closed_at":null,"body":"Hi all, \r\n\r\nwhen I try to run a function (C#) with the azurefunctions CLI via `func run <methodname>` that has a dependency to a third party library (i.e. `ImageResizer`) I get the following error:\r\n\r\n```\r\nReading host configuration file 'C:\\Users\\olarafat\\repos\\serverless-imagemanipulation\\host.json'\r\nFunction compilation error\r\nrun.csx(1,7): error CS0246: The type or namespace name 'ImageResizer' could not be found (are you missing a using directive or an assembly reference?)\r\nrun.csx(7,24): error CS0103: The name 'ImageResizer' does not exist in the current context\r\nrun.csx(12,13): error CS0246: The type or namespace name 'ResizeSettings' could not be found (are you missing a using directive or an assembly reference?)\r\nrun.csx(12,52): error CS0103: The name 'FitMode' does not exist in the current context\r\nrun.csx(19,13): error CS0246: The type or namespace name 'ResizeSettings' could not be found (are you missing a using directive or an assembly reference?)\r\nrun.csx(19,52): error CS0103: The name 'FitMode' does not exist in the current context\r\n```\r\n\r\nThe NuGet packages haven been restored via `dotnet restore`.\r\nThe function works when deployed to Azure.\r\n\r\n#### Repro steps\r\n\r\nThe code and configuration can be found here: [https://github.com/arafato/serverless.imageresizer](https://github.com/arafato/serverless.imageresizer)\r\n\r\n#### Expected behavior\r\n\r\nA locally running function.\r\n\r\n#### Actual behavior\r\n\r\nAn exception (see above)\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments/263730578","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/996#issuecomment-263730578","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/996","id":263730578,"user":{"login":"lindydonna","id":4260261,"avatar_url":"https://avatars.githubusercontent.com/u/4260261?v=3","gravatar_id":"","url":"https://api.github.com/users/lindydonna","html_url":"https://github.com/lindydonna","followers_url":"https://api.github.com/users/lindydonna/followers","following_url":"https://api.github.com/users/lindydonna/following{/other_user}","gists_url":"https://api.github.com/users/lindydonna/gists{/gist_id}","starred_url":"https://api.github.com/users/lindydonna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindydonna/subscriptions","organizations_url":"https://api.github.com/users/lindydonna/orgs","repos_url":"https://api.github.com/users/lindydonna/repos","events_url":"https://api.github.com/users/lindydonna/events{/privacy}","received_events_url":"https://api.github.com/users/lindydonna/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T23:11:44Z","updated_at":"2016-11-29T23:11:44Z","body":"I can't reproduce. I cloned your repo and ran with the latest version of the Functions CLI (https://www.npmjs.com/package/azure-functions-cli). There is a bug with the CLI where you can't use a directory name with dot \".\" as it tries to generate an invalid hostname.\r\n\r\nYou should **not** restore nuget packages with `dotnet restore`. The Functions CLI will restore nuget packages and operates slightly differently."}}
{"actor":{"display_login":"lindydonna"}}