Sam
Sam

Reputation: 30388

Creating Azure Function Project in .NET Core Targets .NET Framework

I upgraded my Visual Studio 2017 to the latest version i.e. 15.3. I then upgraded the VS Extension for Azure Functions and WebJobs.

When I create a new Azure Function project targeting .NET Core 2.0, it still targets .NET Framework. See below...

enter image description here

This is the project file: enter image description here

P.S. To be fair, the dialog says .NET Framework 2.0 NOT .NET Core 2.0. So I guess MS means literally targeting .NET Framework 2.0!!!

Upvotes: 0

Views: 900

Answers (1)

lindydonna
lindydonna

Reputation: 3875

Update 12/21/17 See newer post here: Develop Azure Functions on any platform

Previous answer

The behavior can be a bit confusing; I've now clarified the blog post: Azure Functions Tools released for Visual Studio 2017 Update 3.

The project type is .NET Standard, but we don't currently support the .NET Standard 2.0 facades in the Azure Functions runtime. Now that .NET Standard 2.0 is RTM, we will make this update in a future release. Once this happens, you won't have to make any project changes other than changing the target framework.

Currently, Azure Functions runs only on full framework, so there is no benefit to targeting netstandard2.0. However, we are porting the runtime to .NET Core, at which point there is a difference. Once that work is complete, the New Project dialog will target netstandard2.0 by default.

Upvotes: 4

Related Questions