VS2008: should data sets be placed in App_Data?

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

I'm working on a small Web project in VS2008. In VS2005 it was recommended
that DataSet be placed in App_Data folder (the framework did that
automatically). In VS2008 the framework does not give me that option. The
Add.New Item in the App_Data context menu does not even list the DataSet.

Does anyone know what is behind the change and what the recommended practice
is?
Thanks.
 
In VS2008 it does not suggest as it used to in VS2005. The only way to
place DataSets (i.e. xsd) in App_Code is to drag them into the folder after
creating them. It is not a big deal but I'm curious what the best practice
is.
Another difference is that when you Add a DataSet the TableAdapter wizard is
no longer automatically launched.
Does your VS2008 behave like VS2005 in the above scenarios?

And I don't mean data files.
 
I did not mean instantiated DataSets objects at run time. I was referring
to the process of creating/adding strongly typed data sets to a project in
VS2008 (i.e. Solution Explorer.Add New Item).
 
re:
!> DataSets (i.e. xsd)
!> I was referring to the process of creating/adding strongly typed data sets to a project

Datasets aren't the same as XSD schema.
An XSD file is a schema class that defines what your xml will look like, not including data.

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=97

Also, see :
http://msdn2.microsoft.com/en-us/library/ex526337.aspx

"Arbitrary file types can be placed in the App_Code folder to create strongly typed objects.
Placing Web service files (.wsdl and .xsd files) in the App_Code folder creates strongly typed proxies."




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
I just noticed that made a silly mistake in my original post. It should've
read 'App_Code' instead of 'App_Data'.
Sorry about the confusion.

I'm going back to VS2005. Could not get it to work. I've got also other
issues with VS2008: no table templates, no ATL server libraries for native
development, etc. Simply not worth the trouble.

Thanks to everyone who tried to help.
 
I made a mistake in my original post - I meant "App_Code". Sorry about
that. Anyway, in VS2005 when I add a DataSet to a project the framework
auto-suggests to add it to "App_Code" folder. VS2008 does not give me that
option and associated xsd files are placed in the root instead. As I said,
a minor thing but still annoying.
 
I know that they are not the same and I never implied that. But again,
strange things happen if English is not your native language (like in my
case). I meant "DataSet" that you can find in Add New Item template (I
think that I got the spelling right, just confirmed it). A corresponding
..xsd file (<datasetname>.xsd) is auto-generated after a "DataSet" is ADDED
to the project. VS2005 auto-suggests to place the associated .xsd file in
App_Code folder (and not App_Data that I mistakenly used in my OP). VS2008
does not do that.
 
I created a new project (i.e. web application) instead of new web site as I
used to in VS2005. I was happy to see the model back (i.e. like in VS2003).
Thanks for bringing it up. Do you think that could've made a difference?
I'll try web site later today.
Do you know if best practices are different for web applications? Any links
that deal with the subject?
Thanks
Dan
 
Back
Top