VS 2010 中缺少 App_Code 文件夹 [英] App_Code folder is missing in VS 2010

查看:29
本文介绍了VS 2010 中缺少 App_Code 文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用 VS 2010 RC 创建一个动态数据网站.尝试创建一个 App_Code 文件夹,我将在其中放置一个 LINQ to SQL 类,但失败了.当我选择添加 ASP.NET 文件夹"来添加文件夹时,我可以选择只创建以下文件夹:

I was trying to create a Dynamic Data Website using VS 2010 RC. An attempt to create an App_Code folder where I would put a LINQ to SQL class, failed. When I selected 'Add ASP.NET Folder' to add the folder, I had options to create only the following folders:

  • App_GlobalResources
  • App_LocalResources
  • 应用数据
  • App_Browsers
  • 主题

App_Code 文件夹发生了什么变化?

What happened to the App_Code folder?

推荐答案

为什么不创建另一个项目,一个类库,并将其放在那里.到目前为止,这是将这些类与网站的其余部分分开的最佳方式.

Why not create another project, a class library, and put it in there. That's by far the best way to keep those classes separate from the rest of your website.

要回答有关 App_Code 文件夹的具体问题,它在网站项目中作为 Asp.Net 文件夹提供,您可以从中进行选择.但是从 Web 应用程序项目中,您只需创建一个新文件夹并将其命名为 App_Code,它就可以正常工作.这是从 Visual Studio 2010 RC 开始的.

To answer your specific question about the App_Code folder, it's available in WebSite projects as an Asp.Net folder you can choose from. But from a web application project, you can just create a new folder and name it App_Code and it will work just fine. This is as of Visual Studio 2010 RC.

这篇关于VS 2010 中缺少 App_Code 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆