Add support to the "Azure Functions and Web Jobs Tools" extension within Visual Studio for authoring Azure Functions as a .NET Core class library. This issue is a spin off from a conversation started in #686 and is possibly, semi-related to #790.
When creating a new Azure Function app, you must select between the versions "v1 (.NET Framework)" or "v2 (.NET Standard)".
- If v1 is selected, you can target any version of the .NET Framework <= 4.6.1
- If v2 is selected, you can target any version of .NET Standard <= 2.0
Neither option allows the resulting Azure Function project to target .NET Core 2.x.
Scenario
Given the following VS solution/project architecture for Company Xyz:
Xyz.Common .NET Core 2.x shared library leveraging EF Core and various 3rd party packages
Xyz.Web ASP.NET Core Web Application leveraging AspNetCore.All, EF Core, Controllers, etc.
Xyz.Functions v2 Azure Functions project with HTTP, timer, and queue triggers
Problem
When a project reference is added from Xyz.Functions to Xyz.Common Visual Studio generates a "project not compatible" build error as these two projects reference different frameworks (i.e. .NET Standard != .NET Core).
Reasoning
In a "real word" enterprise-level application, it's a very realistic expectation for a developer to centralize the logic for a specific processing routine and want to leverage that code from an IActionResult in a MVC app and a [TestMethod] in a MSTest project. Continuing with that approach, AF should allow a developer to leverage their .NET Core code from a Trigger as well.
Add support to the "Azure Functions and Web Jobs Tools" extension within Visual Studio for authoring Azure Functions as a .NET Core class library. This issue is a spin off from a conversation started in #686 and is possibly, semi-related to #790.
When creating a new Azure Function app, you must select between the versions "v1 (.NET Framework)" or "v2 (.NET Standard)".
Neither option allows the resulting Azure Function project to target .NET Core 2.x.
Scenario
Given the following VS solution/project architecture for Company Xyz:
Xyz.Common.NET Core 2.x shared library leveraging EF Core and various 3rd party packagesXyz.WebASP.NET Core Web Application leveraging AspNetCore.All, EF Core, Controllers, etc.Xyz.Functionsv2 Azure Functions project with HTTP, timer, and queue triggersProblem
When a project reference is added from
Xyz.FunctionstoXyz.CommonVisual Studio generates a "project not compatible" build error as these two projects reference different frameworks (i.e. .NET Standard != .NET Core).Reasoning
In a "real word" enterprise-level application, it's a very realistic expectation for a developer to centralize the logic for a specific processing routine and want to leverage that code from an
IActionResultin a MVC app and a[TestMethod]in a MSTest project. Continuing with that approach, AF should allow a developer to leverage their .NET Core code from aTriggeras well.