For future reference: I solved the issue by passing the --runtime variable to the dotnet command in the build script. For some reason this is required when building from Jenkins. Building from command line doesn't require using the --runtime variable.
-- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/58337835-67b3-4e68-b002-1fce36a30060%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.