Publish command for ASP.NET Core project only includes DLL files -


i'm trying publish asp.net core 1.0 project, in order able deploy azure (or other hosting environments) later on.

my folder structure follows (not sure if matters):

|_root   |_foo     |_bar -> contains project.json 

from root folder run publish command so:

dotnet publish foo/bar -o artifacts\foobaroutput --configuration release

this creates folder output publish command, only contains assemblies (dll files) , folder called refs containing referenced assemblies.

my question is: how create complete publish package, including static resources such html, javascript, css, configuration files, etc?

am missing in project.json file, or parameters publish command? must missing something, guess there must way specify src folder etc should included in output?

my project.json file looks following:

{   "title": "my web app",   "version": "1.0.0-*",   "buildoptions": {     "debugtype": "portable",     "emitentrypoint": true,     "preservecompilationcontext": true,      "compile": {       "exclude": [ "bin/**", "obj/**", "node_modules/" ]     }   },   "dependencies": {     "microsoft.applicationinsights.aspnetcore": "1.0.0",     "microsoft.aspnetcore.diagnostics": "1.0.0",     "microsoft.aspnetcore.diagnostics.entityframeworkcore": "1.0.0",     "microsoft.aspnetcore.mvc": "1.0.0",     "microsoft.aspnetcore.staticfiles": "1.0.0",     "microsoft.extensions.configuration.json": "1.0.0",     "microsoft.extensions.configuration.usersecrets": "1.0.0",     "microsoft.extensions.logging.console": "1.0.0",     "microsoft.extensions.logging.debug": "1.0.0",     "microsoft.visualstudio.web.browserlink.loader": "14.0.0",     "system.io.filesystem": "4.0.1"   },   "frameworks": {     "netcoreapp1.0": {       "dependencies": {         "microsoft.netcore.app": {           "type": "platform",           "version": "1.0.0"         },         "microsoft.aspnetcore.server.kestrel": "1.0.0"       },       "imports": "dnxcore50"     }   },   "commands": {     "web": "microsoft.aspnet.server.kestrel --server.urls=http://*:8000/"   } } 

you need add publishoptions section in project.json :

"publishoptions": {     "include": [         "wwwroot",         "views",         "web.config",         "appsettings.json",         "appsettings.*.json",         "..."     ] } 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -