>>>>>I am thinking of how better organize some files in the ASP.NET 4.0 project. The project will use datasets (xsd) files. So my questions are:
>>>>>1. Will I have to copy the .xsd file to the customer server when deploying the application?
>>>>>2. Is it a good idea to create a separate folder for all DataSets (xsd) that will be used in the project?
>>>>>TIA
>>>>
>>>>I created a folder (in the application folder of VS 2012) Data_sets (so my directory tree is now App_Name\Data_Sets. Then I copy dataset file MyDataSet.xsd to the folder Data_Sets. Then I add an existing item (Data Set) to the Project. So in the VS tree I see the folder Data_sets and the dataset MyDataSet. But how do I use this dataset in the code? For example, the following does not work:
>>>>
>>>>
>>>>MyDataSet dstMyData;
>>>>// VS does not find MyDataSet
>>>>
>>>>
>>>>How do I refer in the code that the dataset is not in the application root folder but in the sub-folder?
>>>
>>>IIRC when you create any file in a sub-folder then, by default, the folder name is appended to the namespace so in your case the Dataset namespace would be ......Data_sets.MyDataSet. If you don't want that to happen then, after creating the folder open its Properties window and set 'NameSpaceProvider' to false.
>>
>>Thank you for the explanation and how to make NameSpace not necessary.
>
>If the folder is just there as an ide 'organizational' thing I usually turn NameSpaceProvider off but I guess it's mainly a question of taste....
>The option wasn't there in early VS versions....
The folder is - so far - simply for 'organizing' things better. But I am trying to follow the best practice so that the maintenance won't be an issue. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham