Reputation: 735
I have created an Azure function application in Visual Studio 2017 (as detailed here) and the application builds without an issue from within Visual Studio. However when I try and build the application from the command line (simply running msbuild.exe mysolution.sln
) with MSBuild version 15, I get errors such as:
error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
which is most likely because the application references Microsoft.Azure.WebJobs by default as mentioned here.
So I presume I need to restore the Microsoft.Azure.WebJobs package somehow but I am unsure on how to restore packages in an Azure function application manually. I created a project.json
file and listed the package in there but that didn't work. I then created a packages.json
nuget file and that didn't work either. Any ideas?
Upvotes: 0
Views: 718