Azure / Azure/azure-functions-host
Cannot install and reference nuget package from custom nuget server in .csx functions
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
In V2, we should support the ability to reference custom nuget feeds (see details in [SO post on how to do this](https://stackoverflow.com/questions/39532958/how-do-you-use-custom-nuget-feeds-with-azure-functions)). However, when adding a custom Nuget.Config and running dotnet restore in Kudu, running the app will fail with "error CS0006: Metadata file 'PACKAGE_NAME' could not be found".
#### Known workarounds
1. Make sure function.proj and Nuget.Config are in the root of the function’s directory.
2. `cd` into that directory
a. ex: `cd D:\home\site\wwwroot\TimerTriggerCSharp1`
3. run dotnet restore: `dotnet restore function.proj --packages D:\home\data\functions\packages\nuget`
4. Copy project.assets.json from obj => root of function's directory: `cp obj/project.assets.json .`
Contributor guide
Assessment
This issue has not been assessed yet.