Skip to main content
added 5 characters in body
Source Link
David Gouveia
  • 24.9k
  • 5
  • 87
  • 125

The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it shouldn't be passingdoesn't need to go through the the XNA's Content Pipelinecontent pipeline.

To solve this, do the following - onproblem, go to the Solution Explorer, browse into your Content project to your XML file, and then on its Properties, change the Build Action property from Compile to Content, and also enable the Copy to Output Directory property. See picture below:

enter image description here

This way your XML file will still be copied to the Content folder, without being built by the XNA's Content Pipeline.

The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it shouldn't be passing through the the XNA's Content Pipeline.

To solve this, do the following - on the Solution Explorer, browse to your XML file, and then on its Properties, change the Build Action property from Compile to Content, and also enable the Copy to Output Directory property. See picture below:

enter image description here

This way your XML file will still be copied to the Content folder, without being built by the XNA's Content Pipeline.

The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it doesn't need to go through the content pipeline.

To solve the problem, go to the Solution Explorer, browse into your Content project to your XML file, and then on its Properties, change the Build Action property from Compile to Content, and also enable the Copy to Output Directory property. See picture below:

enter image description here

This way your XML file will still be copied to the Content folder, without being built by the XNA's Content Pipeline.

Source Link
David Gouveia
  • 24.9k
  • 5
  • 87
  • 125

The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it shouldn't be passing through the the XNA's Content Pipeline.

To solve this, do the following - on the Solution Explorer, browse to your XML file, and then on its Properties, change the Build Action property from Compile to Content, and also enable the Copy to Output Directory property. See picture below:

enter image description here

This way your XML file will still be copied to the Content folder, without being built by the XNA's Content Pipeline.