Which files to publish? ASP .Net Core 2.0

Refresh

April 2019

Views

670 time

1

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:

/wwwroot
/appsettings.Development.json
/appsettings.json
/ProjectName.deps.json
/ProjectName.dll
/ProjectName.pdb
/ProjectName.PreCompiledViews.dll
/ProjectName.PreCompiledViews.pdb
/ProjectName.runtimeconfig.json
/package.json
/package-lock.json
/web.config

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

3
  • 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).

0

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.