Which files to publish? ASP .Net Core 2.0


April 2019


670 time


I'm working on hosting my first ever Asp.net core 2.0 website. To bundle the project I ran "dotnet publish" This created the following folder structure for publish:


Q1. Which files do I need to copy over to my FTP server? Are all files necessary?

Q2. Where could I find some description as to what each file is?

2 answers

  • wwwroot - static files
  • appsettings.Development.json - environment-specific settings
  • appsettings.json - general settings
  • ProjectName.deps.json - NuGet package manifest
  • ProjectName.dll - compiled project code
  • ProjectName.pdb - symbols for compiled project code (debugging)
  • ProjectName.PreCompiledViews.dll - compiled views
  • ProjectName.PreCompiledViews.pdb - symbols for compiled views (debugging)
  • ProjectName.runtimeconfig.json - runtime configuration (namely what version of .NET Core runtime to target)
  • package.json - node.js package references
  • package-lock.json - node.js lock file
  • web.config - IIS hosting configuration

About the only things you could get rid of are the .pdb files (but you wouldn't be able to debug the application), the package.json files (but you won't be able to restore node.js packages) and web.config (but only if not hosting in IIS).


I think (didn't work on it yet) : wwwroot + dlls generated after the build.

wwwroot contains the static contents (css, js, images ..).

You can read this internet should be full of articles helps you with this topic.