Azure Functions (+ Class Library) with Team City (using V1 and .Net Framework)

Afternoon.

I've been spending the past 7 hours trying to set up a build pipeline for an Azure Function on Team City to no avail.

The set up is:

Azure Function (V1, .Net Framework not Core, we're not on Core yet due to the overhead required for the codebase).

The Function calls in a Class Library (.Net Framework, 4.6.1)

 

The Function Builds fine locally, Runs fine locally, and the Tests wrapping the Class Library work fine locally.

When trying to set up a pipeline I've run into very little in the way of documentation. I was using this article to go off but its just not coming together.

 

https://ceglarek.org/2018/01/30/building-azure-functions-project-on-teamcity/

 

I'm hitting the same 3 issues time and time again.

The first is that when building the Function, if we use a DotNet Restore or similar I get an error that states the project.json is missing for the Class Library (which is strange because obviously its Framework not Core so that shouldn't affect it).

Skipping over DotNet Restore and trying to rely purely on Nuget restore and trying DotNet Build causes the Nuget packages attached to the Function to not be restore (obviously).

The last is if I skip over using any DotNet steps and use basic Nuget restore and Visual Studio MSBuild steps when trying to package the Artifact with a nuspec it doesn't read anything inside the bin folder.

 

I've had problems with Core previous in VSTS at a previous job so I know this stuff is a pain to get working, but this is the Framework version rather than Core so it shouldn't been as problematic I would have thought, even though it is Azure.

 

Any help would be great. Steps for a simple pipeline for Azure Functions V1 would be amazing.

0
1 comment

Hello,

Thanks for question. We'll investigate possible problems with building and publishing Azure Functions as part of the issue: TW-58400

If you could privately share the complete build log from your build configuration with "teamctiy-developers" group in the mentioned issue it will help us to investigate the problems.

0

Please sign in to leave a comment.