You create a project in Microsoft Visual Studio 2008.
An XML Schema (.xsd) file in the project includes another .xsd file. The first .xsd file uses a relative path to indicate the file location for the second .xsd file.
A complex type of the first .xsd file contains an element. The element references a type that is in the second .xsd file.
You build the project, or you click Run Custom Tool for the first .xsd file.
In this scenario, you receive an error message that resembles the following:
Custom tool error: Failed to generate code. The 'XXX' element is not declared.
Note 'XXX' represents the name of the reference element.
This problem occurs because of a bug in the MSDataSetGenerator custom tool.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
You must have Visual Studio 2008 Service Pack 1 (SP1) installed to apply this hotfix.
You do not have to restart the computer after you apply this hotfix if no instance of Visual Studio is being used.
Hotfix replacement information
This hotfix does not replace other hotfixes.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
To work around this problem, use the full path instead of the relative path to indicate the file location of the .xsd file that you reference.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Microsoft Visual Studio 2008 Service Pack 1, Microsoft Visual Studio 2008 Professional Edition, Microsoft Visual Studio 2008 Standard Edition, Microsoft Visual Studio Team System 2008 Team Suite, Microsoft Visual Studio Team System 2008 Database Edition, Microsoft Visual Studio Team System 2008 Architecture Edition, Microsoft Visual Studio Team System 2008 Development Edition, Microsoft Visual Studio Team System 2008 Test Edition