Strongly-typed datasets are the default option for creating a data access layer (DAL) with the various .NET versions of Visual Studio. From the XSD file that defines a strongly-typed dataset, Visual Studio generates a [XSD].Designer.cs and [XSD].xss. They’re regenerated every time you change the XSD, even if you just change the layout. This can become a problem when working in teams and it’s necessary to merge changes. If your Subversion repository is configured to version the generated files, they’ll be marked as conflicting when you update.
These are the steps I’ve taken to merge changes in the situation above:
- Delete [XSD].Designer.cs and [XSD].xss.
- Resolve conflicts in the XSD file (and mark them as resolved). This will generate new versions of [XSD].Designer.cs and [XSD].xss.
- When resolving conflicts in the files generated in step 2, use the whole file that was just generated.
This will be much easier than trying to resolve conflicts in generated files.
Hello,
I have found the same problems with Subversion and Typed Dataset. The solution is exactly what you do: delete autogereted files, merge xsd and regenerate deleted files.
How do you manage that in real project? Is there any coordination between developer when one need to touch/modify a dataset?
My test with subversion (in Italian, sorry):
http://fhtino.blogspot.com/2008/04/subversion-primi-test-con-visual-studio.html
Fabrizio
The team I’m on works in the same room, so we can just talk to each other before a commit operation.
Scott,
Yeah – we have same setup here at UC and we do the same methods you are doing. However we do notice that if someone pulls down the entire solution from Subversion for the first time they have to double click each XSD and then CTRL+S to save them so that the project doesn’t generate errors.
Also, there are serveral other files we cannot commit or it causes a heck of a lot of problems such as proj files, etc.
Now when we go to Commit we have to see a huge list of files we don’t want to commit and it’s getting very hard to understand.
Do you know of any way to have Subversion filter out certain file extensions? I can’t figure it out…
Let me know if you can!
If you use TortoiseSVN, there’s a Global Ignore Pattern option you can fill in with the file pattern (or patterns) you want Subversion to ignore.
For example, I use ReSharper in my development work. To keep the files ReSharper generates from being versioned, I set my global ignore pattern to the following:
*/_ReSharper* *resharper* _ReSharper*
So if you wanted to keep out *.Designer.cs files and *.xss files, you’d set the global ignore pattern to:
*.Designer.cs *.xss