0
\$\begingroup\$

I tried to create something to parse XML with, which needs the inclusion of the Microsoft.Xna.Framework.Content.Pipeline; reference. This was fine and all, but as soon as I tried to debug, I got the error that it could not be resolved because it was in the wrong target framework; my main project uses the Client one.

What confuses me is that I can use the SkinnedModelProcessor in the same solution with no problems when it uses said non-Client framework. Why is this? Can I get mine to work without changing the main project's target framework?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The XNA content pipeline assemblies depend on the full version of the .NET Framework (instead of the Client Profile). This is because they use features not available in the client profile (probably the MSBuild stuff).

You can select which version of the framework to build against in the properties window for your assembly:

Target Framework Selection

However: The XNA Content Pipeline assemblies are not redistributable. So anyone using your game would need to install Visual Studio (Express) and XNA Game Studio by downloading them manually from Microsoft. Not exactly user-friendly!

(Also the full version of the framework is much larger than the client profile and takes longer to install, which may be a consideration for distribution as well.)

My recommendation would be to parse your XML at build-time using a content pipeline extension. Or load your XML using some other .NET XML reading method. Or use a different serialisation format entirely, maybe simple text files, or something using BinaryReader/BinaryWriter.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .