You receive an error message when you build a Visual Studio 2008 project or click Run Custom Tool for an .xsd file that includes another .xsd file in the same project

Article translations Article translations
Article ID: 974158 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • 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.

CAUSE

This problem occurs because of a bug in the MSDataSetGenerator custom tool.

RESOLUTION

Hotfix Information

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:
http://support.microsoft.com/contactus/?ws=support
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.

Prerequisites

You must have Visual Studio 2008 Service Pack 1 (SP1) installed to apply this hotfix.

Restart requirement

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.

File information

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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Microsoft.visualstudio.editors.dll9.0.30729.44072,879,48821-Sep- 200901:00x86
Microsoft.vsdesigner.dll9.0.30729.44074,427,77621-Sep- 200901:00x86

WORKAROUND

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.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 974158 - Last Review: October 7, 2011 - Revision: 2.0
APPLIES TO
  • 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
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB974158

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com