[英]Some folder are not pushed to server when deployed to azure website in asp MVC using visual studio web deploy
It seems that this problem is not popular that even stackoverflow has no post about it. 似乎这个问题并不普遍,即使stackoverflow也没有关于它的帖子。
I just deployed my MVC 5 web site to Azure Web Site and found out that some of my custom folders are missing, not pushed to the server. 我刚刚将我的MVC 5网站部署到Azure网站,发现我的一些自定义文件夹丢失了,没有推送到服务器。
I tried to delete and create the same folder inside visual studio and then redeploy it again, but did not work. 我试图在visual studio中删除并创建相同的文件夹,然后再次重新部署,但是没有用。
I would like to know if there is a way to manually create a folder inside azure web sites directory? 我想知道是否有办法在azure网站目录中手动创建一个文件夹? How do we actually edit the root directory manually? 我们如何实际手动编辑根目录? anything like control panel for azure web site file management? 用于天蓝色网站文件管理的控制面板?
Creating empty folders in your code is super simple (I assume you're using C#): 在代码中创建空文件夹非常简单(我假设您使用的是C#):
string path = @"Path\To\Folder\You\Want";
Directory.CreateDirectory(path);
If the directory already exists the CreateDirectory call won't do anything 如果目录已存在,则CreateDirectory调用将不执行任何操作
我发现Visual Studio在部署时排除了空文件夹,所以我必须将任何文件放到那些空文件夹中以使visual studio包含它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.