Reputation: 1032
I have created an Azure Function using the latest build of visual studio 2017 (15.3.1).
This build allows me to do the:
New Project > Azure Function App approach
This produces a .csproj (not a .funproj file) and it's doesn't come bundled with a website or anything. I've tried .Net 4.6 and 4.6.1 as the target framework and neither have worked.
I get the following error in VSTS:
C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props (13, 3) C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props(13,3): Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
There is no node in my .csproj file so I am not sure where it is getting that from.
I'm using the latest NuGet option in VSTS, I'm using the Latest VS Version option as well.
The build steps are:
Is there any way to build (and then release) compiled .Net functions in VSTS at the minute?
Upvotes: 2
Views: 315
Reputation: 1032
I was able to solve this by swapping the build agent from the "Default" group to the latest, "Hosted VS 2017" group, and that has compiled fine.
Upvotes: 3
Reputation: 7382
Looks like the machine is missing the latest dotnet cli. I'm not too familiar with VSTS build machines, but you'd need to get that on there somehow https://www.microsoft.com/net/download/core
Upvotes: 2