Target .NET Core 2.0 with Azure Functions in Visual Studio 2017

后端 未结 3 1228
别跟我提以往
别跟我提以往 2021-01-03 21:57

Since Microsoft has released .NET Core 2.0 for Azure Functions a few days ago, I\'m trying to understand how to create a new Functions project in VS2017 targeting .NET Core.

3条回答
  •  执笔经年
    2021-01-03 22:44

    For now, it's a manual process. You need to create .NET Standard 2.0 library, add function.json manually and run it with core tools.

    the package Microsoft.NET.Sdk.Functions does not yet support .NET Standard 2.0 class libraries. This is the package that identifies a project as Functions project to Visual Studio and generates function.json from attributes during build.

    You can still author C# class libraries that target .NET Standard 2.0, but you must use a manually-authored function.json. The templates for C# class libraries aren’t yet available in the Core Tools, but you can get a sample from GitHub.

    from Develop Azure Functions on any platform

    Update: 1.0.5 version of SDK should now support it, as mentioned by Fabio.

提交回复
热议问题