I have an Azure Function app, written in C#. I can run and debug it locally, using Visual Studio 2017 (Professional, version 15.5.3). I can also build it locally using msbuild from the developer command prompt for vs 2017.
This app will not build on our Jenkins instance - either using Visual Studio Build Tools or by installing Visual Studio Community on the VM (I don't have a licence for professional for a build server) and using the developer command prompt there. (I have ensured that the .NET Core build tools are installed, see Visual Studio 2017 MSBuild failed to build Azure Functions)
I'm getting the following error:
C:\Program Files\dotnet\sdk\2.1.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(557,9):
error MSB4186: Invalid static method invocation syntax: "[System.IO.Directory]::GetParent().get_Name()".
Method 'System.IO.Directory.GetParent' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a,b)).
[c:\jenkins\workspace\Folder.Name\Job Name\Project.Name\Project.Name.csproj]
I have checked that the mentioned SDK is the same version as that which works on my local machine.
What do I need to do to get this VM able to build an azure function app?