最近,我安装了带有.NET Core Preview 4 SDK的VS 2017 RC。
在新的SDK中,没有project.json
文件,只有csproj
文件:
<PropertyGroup>
<OutputType>winexe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup
问题在于现在,
dotnet publish
输出的是 dll
文件而不是 exe
文件。我尝试运行 dotnet publish -r win10-x64
但它甚至无法编译。我该如何在 dotnet 1.1 Preview 中创建自包含应用程序?也许应该在 csproj 中指定
runtime
部分(就像在 json 中所需的那样)?
dotnet build -r win10-x64
和dotnet publish -r win10-x64
。 - pwas