How to Configure an Alternative Folder to wwwroot in ASP.NET Core? -
is possible configure different folder replace wwwroot in asp.net core? , if yes, how , there side effects change?
the config includes wwwroot in entire project found in project.json seen in code below; replacing value name of new folder not enough static file (ex: index.html) read.
"publishoptions": { "include": [ "wwwroot", "web.config" ] },
is possible configure different folder replace wwwroot in asp.net core?
yes. add usewebroot
call in program
class:
public static void main(string[] args) { var host = new webhostbuilder() .usekestrel() .usewebroot("myroot") // name whatever want .usecontentroot(directory.getcurrentdirectory()) .useiisintegration() .usestartup<startup>() .build(); host.run(); }
are there side effects change?
here 3 can think of:
- the bower package manager not work properly, looks
lib
folder inwwwroot
. i'm not if configurable. - you need fix
bundleconfig.json
@ new directory. - you need update
include
portion inproject.json
include new directory in publish output.
Comments
Post a Comment