Search code examples
c#asp.net-core.net-coreftppublish

.net core 2.0 prepare all files to publish in one folder in by running command


I want to prepare all files to upload by FTP. I tried command dotnet publish -c Release -o ~/Desktop/toFtp. Unfortunately view folder was not copied. Is there a way to do it?


Solution

  • According to the docs:

    The ASP.NET Core 2.x project templates enable precompilation by default.

    This simply means there will be no .cshtml files, etc, as they're precompiled into the published output i.e. assembly for you.

    If you examine the published output, you should see something like:

    YourMvcProject.PrecompiledViews.dll