Dataset in Visual Studio project - VS crash and designer.cs file disappeared

R

Robert Janik

Hi,

I have a problem when working with datasets in Visual Studio 2005 in Smart
Device project.
I created a dataset and in one table I defined a column as Enum whihc I
defined.

Example:

public enum GPSStandard
{
NMEA = 0,
SiRF = 1
}

When I defined default value "0" and saved dataset, Visual Studio crashed.
When I opened solution again and attempted to open dataset I recevied an
error message and dataset.designer.cs file disappeared from Visual Studio
project. I found this file in Recycle Bin, so I was able to restore it. But
I was still unable to open dataset. I had to change dataset.xsd manually, by
removing default="0". But another problem is that when you change xsd file,
Visual Studio automatically deletes Dataset.Designer.cs file and removes it
from the project.
I know that I should define default value for example GPSStandard.NMEA, but
trying to define a value of differnet type or mistyping shouldn't lead to
crash and automatic file remove.

Why Visual Studio deletes files from project and from hard drive?

Every time I work not only with datasets, but with designer in general I
have to make small changes, save file and open it again to see if VS
actually didn't corrupt anything.

Could I use compact framework 2.0 in VS 2003? VS 2005 doesn't seem to be a
finished product.

Another problem is when I need to copy cs file which was absolutely
independent on dataset I described. This time my dataset was properly
defined and I even didn't touch it. When I selected cs file on one project
and I pressed Ctrl-C, I selected another project, right-clicked on it and
chose Paste. File was copied successfully, but again Dataset.Designer.cs
disappeared.
I new what's going on here, so I immediately restored the file from Recycle
Bin. VS was able to open dataset without any error, so this cannot be the
reason to delete the file.

Why this happened? As I said this cs file was unrelated to dataset. It was a
small class with a few variables and properties with some XML attributes.

I'll appreciate any help. I'm quite scared of doing anything, because I
cannot do backup or check-in/check-out after every little change in the
code. I'm able to do backup once a day, but I need to work for this one day
uninterrupted by such failures. Maybe somebody knows how to tweak VS 2005
(say set a registry key to disable automatic file delete?).

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top