I want to create a Nuget package of my Azure functions V2 project so that i can push it to octopus for deployment. But I am facing issues, Currently I am using dotnet pack <.csproj> to package my code into .nupkg. If I use simple console .net core application or library .net core than I am able to get nupkg file but if I run dotnet pack <.csproj> on my azure functions project than I get publish folder as bin\Debug\netcoreapp2.1\publish. And in publish folder my code files and dlls are present. But where is the nupkg file?
This question is an old question, take a look here:
https://github.com/Azure/azure-functions-vs-build-sdk/issues/110
dotnet pack cannot package azure function. The IsPackable property seems to be forcibly locked to false, and even modifying the property manually will not help. dotnet cli will refuse to generate .nupkg files.
In fact, simply referencing Microsoft.NET.Sdk.Functions in your project will invalidate the dotnet pack. This is not your mistake, but the design of the azure function.