Unable to build standalone binaries with .NET Core 1.1 using csproj
So, I just installed Visual Studio 2017 and decided to make the leap to csproj files from project.json, ran a dotnet migrate on a project that used to produce standalone executables and now it produces DLL files.
Has this functionality been eliminated or am I missing something? This was a major factor in my ability to push adoption of CoreCLR.
Here is a gist of the original project.json file and the migrated csproj.
... and I feel rather silly. It did publish it, the output simply did not list it as having been published.
[root@a601d681038f grr]# dotnet publish -f netcoreapp1.0 -r centos.7-x64
Microsoft (R) Build Engine version 15.1.454.57113
Copyright (C) Microsoft Corporation. All rights reserved.
grr -> /sandbox/grr/bin/Debug/netcoreapp1.0/grr.dll
In project.json world, publishing a standalone app and a portable app were a development decision (type: platform in the project.json).
In msbuild, this is actually a deployment decision, meaning, that when you run dotnet publish, if you want to publish it as a standalone app, you just need to pass the --runtime flag to it indicating for which runtime you want to publish it for.
I see, thank you @livarcocc, yeah I was running it with -r, but I guess I was used to the old output and didn't bother to browse the bin folder myself - my apologies :) keep up the great work guys!