我应该完全按照错误信息所说的go 做.从RC1迁移时,我没有意识到我必须在project.json
文件中指定一个runtimes
节.
在我的project.json
页中,我添加了以下部分:
"runtimes": {
"win10-x64": { }
}
我已经准备好出发了.
Update 27 February 2017
如果您 Select 将应用程序部署为Framework Dependent Deployment
(FDD),Visual Studio 2017 RC中的新项目模板不再要求提前指定运行时间(在project.json
或.csproj
中).
但是,如果 Select 使用Self-contained Deployment
(SCD)部署应用程序,则需要在.csproj
文件中指定希望应用程序在in advance上运行的所有运行时间.
下面是使用SCD部署方法的应用程序的.csproj
文件示例:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<VersionPrefix>1.0.0</VersionPrefix>
<DebugType>Portable</DebugType>
<RuntimeIdentifiers>win10-x64;osx.10.11-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
</Project>
请参阅this link了解更多信息,其中包括两种部署选项的详细描述,以及它们的优缺点.