.net core Visual Studio和自包含部署

.net core Visual Studio和自包含部署,.net-core,visual-studio-2017,.net Core,Visual Studio 2017,我正在尝试使用Visual Studio发布。通过运行以下命令,我可以使用CLI轻松实现这一点: dotnet new mvc --auth None --framework netcoreapp1.1 dotnet restore --runtime win81-x64 dotnet build dotnet publish -c release --runtime win81-x64 此命令将创建新的mvc应用程序,恢复win81-x64运行时的

我正在尝试使用Visual Studio发布。通过运行以下命令,我可以使用CLI轻松实现这一点:

dotnet new mvc --auth None --framework netcoreapp1.1            
dotnet restore --runtime win81-x64      
dotnet build
dotnet publish -c release --runtime win81-x64    
此命令将创建新的mvc应用程序,恢复win81-x64运行时的所有库,并将发布它。因此,部署将包含.net core 1.1/win81-x64平台的运行时作为应用程序的一部分。这样,我就可以将其安装在未预装.net core 1.1的服务器上

我的问题是如何使用Visual Studio 2017发布UI实现这一点?如果我进行简单发布,它将不包括.net核心运行时文件


谢谢

不幸的是,这项功能(在发布期间选择运行时)没有进入VS 2017 RTM版本。我们计划在将来的版本中添加它

现在,要解决没有该功能的问题,可以将
属性添加到.csproj中

<PropertyGroup>
  <TargetFramework>netcoreapp1.1</TargetFramework>
  <RuntimeIdentifier>win81-x64</RuntimeIdentifier>
</PropertyGroup>

netcoreapp1.1
win81-x64
现在,当您发布时,它将为该运行时独立发布


如果要在没有.net核心运行时文件的情况下发布应用程序,则需要删除此属性。如果要为其他运行时发布,可以更改该值。

回答不错。只是连接你的其他答案。这个问题没有询问FDD,但另一个问题的框架是——即添加
将执行SCD,删除它将执行FDD。;步骤4描述了如何添加以实现SCD