Last post Nov 08, 2017 03:18 AM by Edward Z
Nov 07, 2017 04:18 PM|jtsharp|LINK
I am publishing a NetCore 2 app for Linux and IIS.
When I use the default publish options from Visual Studio 17 it creates two folders in the bin/Release: netcoreapp2.0 and PublishOutput.
I have been using the PublishOutput folder for the apps on the Linux and IIS servers, but I am wondering what the netcoreapp2.0 folder is and does. I could not find a clear answer in the docs on how or why I would use one or the other or what the purpose
Nov 07, 2017 07:49 PM|Radomir|LINK
You have been doing it correctly :) PublishOutput is what you should be using (when you publish the app). the other folder (netcoreapp2.0) is to run the app locally - if you look at what it contains you'll notice it's just a small subset of PublishOutput.
Also, this gets generated when you build the app (even if you never publish it - as you noted PublishOutput folder gets generated only when you choose Publish option).
Nov 08, 2017 03:18 AM|Edward Z|LINK
As the suggestion from Radomir, netcoreapp2.0 is generated while you build the project with Release configuration.
If you check the output after publishing the project, you will find it has two lines like below:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
Build process generates netcoreapp2.0 and Publish process generates PublishOutput. Before publishing, it will build the project first. You just need to use PublishOutput while publishing.