简体   繁体   English

Service Fabric-创建net core 2.0项目,但目标框架为4.6

[英]Service Fabric - create net core 2.0 project, but target framework is 4.6

I create empty service fabric project and add a single .net core 2.0 aspnet statefull service. 我创建了一个空的服务结构项目,并添加了一个.net core 2.0 aspnet statefull服务。 When I check the properties of the web project, the target framework is 4.6, not .net core 2.0. 当我检查Web项目的属性时,目标框架是4.6,而不是.net core 2.0。

My visual studio is 2017 latest update and with .net core 2.0 sdk installed. 我的Visual Studio是2017年的最新更新,并安装了.net core 2.0 sdk。 The project structure is according to .net core. 项目结构是基于.net核心的。

Is this a bug or I'm missing something? 这是一个错误还是我缺少了什么?

Service Fabric itself is built on top of the .net framework. Service Fabric本身是建立在.net框架之上的。 The web project is still ASP.net core, though. 但是,该Web项目仍然是ASP.net核心。 The Microsoft.AspNet.Core libraries target netstandard2.0, which .NET 4.6 implements. Microsoft.AspNet.Core库以.NET 4.6实现的netstandard2.0为目标。

Note: 注意:
If you create an ASP.net Core web project using Visual Studio 2017 you can actually switch between .NET Core and .NET Framework. 如果使用Visual Studio 2017创建ASP.net Core Web项目,则实际上可以在.NET Core和.NET Framework之间切换。 If you select .NET Framework (in the top left dropdown) it will disable the 'Enable Docker Support' checkbox. 如果选择.NET Framework(在左上角的下拉列表中),它将禁用“启用Docker支持”复选框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM