views:

2935

answers:

2

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_Data
  • App_Browsers
  • Theme

What happened to the App_Code folder?

+2  A: 

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.

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.

Chris Conway
It's a demo application. I want it to be as simple as possible.
Vadim
I would still add another project for your dal classes. It really doesn't add any complexity and you can use it again if you need to make it more production level.
Chris Conway
I agree with the suggestion, but this really doesn't answer the question.
Sam
@Sam: Chris answered the question in the second paragraph of his answer. In "web application" projects (like "Dynamic Data") you have to create "App_Code" manually as a normal folder, that's all. That's not specific to VS2010 but also the case in VS2008.
Slauma
@Slauma, the second paragraph wasn't present when I made my comment.
Sam
I could have get a clue looking at the time of your post and of Chris' edit. Sorry!
Slauma
A: 

The Bug is that the calasses into the manualy created folder are not visible and can not be acceset from the other page files. I can't use an separate class library because I have to use a webGlobal resource files to implement a Localized app.

AlexNikolov