Link to home
Start Free TrialLog in
Avatar of Vadim Rapp
Vadim RappFlag for United States of America

asked on

How to add existing dataset file to the project?

I have a project with a dataset file in it, which is comprised of .xsd file, .designer.vb file, .vb file with the code, xcs file, and .xss file, which all work together and provide me with graphical design interface, as well as the code.

User generated image
I need to "import" this dataset into another project.  How to do that? If I import only .xsd file, it does not take the other files. If I import all these files, they appear as independent in the solution explorer, rather than grouped together under .xsd.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

If I import all these files, they appear as independent in the solution explorer, rather than grouped together under .xsd.
it should be just working fine...

1. try to copy those files over into another project's folder.
2. open that another project
3. and then make sure the show all files in your solution explorer is clicked.
4. right click those files and click include in project.

refresh the solution explorer if necessary.
do you need further assistance here?
Avatar of Vadim Rapp

ASKER

In the first project, there are 4 dataset-related files:

User generated image
I copy them to the 2nd project; in solution explorer I click 'all files", and here's what I see:
User generated image
As you can see, 3 of them are grouped together as they should, but the 4th one is not.

If I right-click any of them, "include in project" is greyed out.
another way to go is try add an existing item...

try right click the Project Name (bold text) from Solution Explorer and then go to Add > Existing Item.

or directly press Alt + Shift + A to add that dataset file.

User generated image
see original question.
did you understand my latest suggested approach?
Yes, it's the same as what was in the last two sentences of the original question.
the Add Existing Item to add .xsd file working fine with me in my environment: Windows 10 + VS 2010 Premium Edition.

are you able to compile and use that dataset file in your original project?
>are you able to compile and use that dataset file in your original project?

Yes, absolutely

> Add Existing Item to add .xsd file working fine with me in my environment: Windows 10 + VS 2010 Premium Edition.

so you add existing, select just one xsd file, and all related files get transfered as well and become correctly related ?
SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The last comment shows the alternative way that works always. Expert's comment showed that sometimes (simple cases with one datatable?) it can work by importing as well.
shows the way that works without errors.