简体   繁体   English

使用visual studio web deploy在asp MVC中部署到azure网站时,某些文件夹不会被推送到服务器

[英]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.

相关问题 使用Visual Studio Web Deploy发布我的asp.net mvc Web应用程序将列出一些需要部署的文件,尽管我没有修改它们 - Publishing my asp.net mvc web application using Visual Studio Web Deploy will list some files as need to be deployed , although i did not modify them ASP MVC应用程序的Visual Studio Web部署 - Visual Studio web deploy of ASP MVC app 是否可以在本地IIS Web服务器上测试Asp.net MVC(使用Visual Studio开发)作为网站的根应用程序……? - Is it possible to test Asp.net MVC (being developed using Visual Studio) on Local IIS Web server as the root application of a website …? 部署到Azure ASP MVC 4时捆绑不起作用 - Bundling not working when deployed to azure asp mvc 4 Visual Studio Online网站以调试模式部署到Azure - Visual Studio Online website gets deployed to Azure in debug mode 在Web应用程序和Visual Studio for ASP.NET MVC上使用图像 - Using images on Web Applications and Visual Studio for ASP.NET MVC 将 ASP.net MVC 网站部署到 Azure 网站的子文件夹? - Deploy an ASP.net MVC website to a subfolder of an Azure website? 将ASP.NET Web项目上的现有数据从Visual Studio中的本地数据库部署到Azure数据库 - Deploy existing data on ASP.NET web project from local database in Visual Studio to Azure database 如何将ASP.NET MVC 5 Web App部署到带有Visual Studio 2015 Enterprise的Apache(带有Mono)? - How to Deploy ASP.NET MVC 5 Web App to Apache w/ Mono w/ Visual Studio 2015 Enterprise? 如何将 ASP.Net MVC 5 代码从 Visual Studio 部署到 GoDaddy Plesk 服务器 - 代码优先 - How to deploy ASP.Net MVC 5 code from Visual Studio to GoDaddy Plesk Server- Code First
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM