visual-studio 如何在 Visual Studio 中添加 App_Data 文件夹?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1369436/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:57:18  来源:igfitidea点击:

How do i add an App_Data folder in visual studio?

visual-studioappdata

提问by burnt1ce

This is a silly question but How do I add an App_Data folder to a project? i have an xsd file that i want to include into the project.

这是一个愚蠢的问题,但如何将 App_Data 文件夹添加到项目中?我有一个要包含到项目中的 xsd 文件。

回答by marc_s

App_Data only exists for ASP.NET web sites and web applications.

App_Data 仅存在于 ASP.NET 网站和 Web 应用程序。

If you have a web app or web site, right-click on the main node for the web site/app and pick "Add ASP.NET Folder" - this opens up a context submenu, which should contain "App_Data" as one of its options.

如果您有 Web 应用程序或网站,请右键单击该网站/应用程序的主节点并选择“添加 ASP.NET 文件夹” - 这将打开一个上下文子菜单,其中应包含“App_Data”作为其中之一选项。

alt text

替代文字

Marc

马克

回答by Corey Sunwold

Right click on the project, add new folder and title it "AppData"

右键单击项目,添加新文件夹并将其命名为“AppData”

回答by Usama

I had the similar issue. If you have two options in your "new project"then select the one with the name: "ASP.NET Web Application (.NET Framwork)"instead of the one with the name: "ASP.NET Core Web Application"

我有类似的问题。如果您的“新项目”中有两个选项,则选择名称为:“ASP.NET Web 应用程序(.NET 框架)”的选项,而不是名称为:“ASP.NET Core Web 应用程序”的选项

This is my troubleshoot and It worked for me :)

这是我的故障排除,它对我有用:)