Build Error with pre-compiled Azure Function Library

前端 未结 2 1901
囚心锁ツ
囚心锁ツ 2021-01-19 07:37

Recently, I converted an Azure Function that used a C# script (*.csx) to a pre-complied class library using the Visual Studio Studio Tools for Azure Functions.

2条回答
  •  清歌不尽
    2021-01-19 08:05

    UPDATE 2018-01-08

    According to a new answer by @theGRS https://stackoverflow.com/a/48156446/621827 this has been resolved.

    Previous Answer

    Here's what I've found.

    dotnet msbuild uses the Microsoft.NET.Sdk.Functions .NETStandard 1.5 library which if you look at the dependencies on NuGet it doesn't use Microsoft.Azure.WebJobs

    But if you use the Visual Studio 2017 msbuild it will use the .NETFramework 4.6 version of the library which includes Microsoft.Azure.WebJobs.

    My suggestion is to use MSBuild for now. I've written a tutorial on how to do this.

提交回复
热议问题