ASP.NET: Publishing Website doesn't publish Resources folder

后端 未结 4 1241
野的像风
野的像风 2021-01-02 07:49

I have a website that I\'m developing with ASP.NET. I\'m using Visual Studio 2015. When I right-click and hit publish website the site publishes correctly except that my res

4条回答
  •  心在旅途
    2021-01-02 08:38

    Make sure the contents of your Resources folder have the proper "Copy to Output Directory" property. Right click the files you want to copy over, select Properties, then in the Advanced section look at the value under Copy to Output Directory. Generally this is set to "Do not copy" by default since most things get packaged up in the .dll. Change it to "Copy if newer" to get it to bring over the file. It'll bring over the folder structure as well.

提交回复
热议问题