How do I work around "Empty choice is unsatisfiable if minOccurs not equal to 0. An error occured at file://[some path to XSD]"?
You might have received this error message if you followed these steps:
- Install BizTalk 2004 on a clean machine with Visual Studio .NET 2003,
- Start Visual Studio and Create a new C# project (Windows Application for instance),
- Save the solution/Project,
- Right click on the project name in the solution explorer and select "Add-> New Item ...",
- Click "Data Set" and press "OK",
You see the following error message (the path under the white box is the path to the XSD that has been created when you inserted the DataSet):
When you install BizTalk, there is a component called "BizTalk developer tools". This component contains all the logic to integrate with Visual Studio .NET 2003: pipeline designer, BizTalk Explorer and among many other things, a schema editor.
The error you are seeing is because the BizTalk Editor is trying to edit a DataSet schema and got confused. To workaround this, you have to ensure that DataSet schemas are opened with the Visual Studio Schema Editor and not the BizTalk Schema Editor. Here are two different workarounds:
- Bypass the BizTalk Schema Editor when editing the schema (works around the problem once)
- Reset the default editor to the Visual Studio Schema Editor instead of the BizTalk Schema editor (puts the Visual Studio Schema Editor back as the default XSD editor)
Bypass the BizTalk Schema Editor when editing the DataSet:
- Open the solution in VS.NET 2003
- Insert the DataSet as explained above (steps 4 and 5). You see the error, but you also see that the DataSet item was created and added to the solution explorer
- Click "OK" to close the error box
- In the solution explorer, locate the schema and right click on it
- Select "Open With ..."
- In the dialog box, select "XML Schema editor" and click "Open"
Set the Visual Studio Schema Editor back to default editor:
- Follow the steps 1 to 5 above
- In the "Select XML Schema Editor" dialog box, select "XML Schema Editor" and click "Set as default".
- Press OK to open the DataSet