0

I used the skinned model sample from Microsoft to load my Blender model (.fbx) and play their animations. A import SkinnedModelWindows and SkinnedModelPipeline projects and I added them as a reference. But when I want to get skinning data (from SkinnedModelPipeline) I get this warning:

The referenced assembly "...\SkinnedModelPipeline.dll" could not be resolved because it has a dependency on "Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.

and skinning data is still null:

SkinningData skinningData = model.Tag as SkinningData;

        if (skinningData == null)
            throw new InvalidOperationException
                ("This model does not contain a SkinningData tag.");

from this I get the exception.

And ideas how to solve it?

Thanks very much!

Neil Knight
  • 47,437
  • 25
  • 129
  • 188
Darkry
  • 590
  • 2
  • 12
  • 26

2 Answers2

2

It sounds like your project needs to be built against the full version of the .NET Framework, rather than the Client Profile. In the project properties in Visual Studio, there should be an option that lets you change the target framework on the Application tab.

Cole Campbell
  • 4,846
  • 1
  • 17
  • 20
  • In the SkinnedModelPipeline project it is set to: .Net Framework 4.0 - not to the client version. And in my base project (the application) I can't select the "Target framework" in properties. It is disabled. Output type is set to Windows Application. – Darkry Nov 29 '11 at 15:23
  • 1
    @Darkry That issue is addressed [here](http://stackoverflow.com/questions/6522455/unable-to-select-target-framework-for-xna-4-0-games). Of course, your game shouldn't be referencing a pipeline extension in the first place. – Andrew Russell Nov 29 '11 at 15:48
1

Re-check the sample and look at which project is referencing which:

  • Your game project should only reference SkinnedModelWindows
  • Your content project should only reference SkinnedModelPipeline
  • SkinnedModelPipeline references SkinnedModelWindows

All projects only need to target the .NET 4.0 client profile, except for SkinnedModelPipeline, which requires the full framework (because the content pipeline assemblies for building content require it).

Andrew Russell
  • 26,924
  • 7
  • 58
  • 104
  • All references are set exactly as you said. SkinnedModelPipeline is .NET Framework 4.0 (no client) version set and the other projects (my project and SkinedModelWindows) has disabled the Target framework option. – Darkry Nov 29 '11 at 15:59
  • I have to change those grayd out tabs? I think it should go without changing it. – Darkry Nov 29 '11 at 16:52
  • Note the link in my comment on Cole Campbell's answer, if you are having trouble with the disabled target framework option. ([Here it is again](http://stackoverflow.com/questions/6522455/unable-to-select-target-framework-for-xna-4-0-games).) – Andrew Russell Dec 01 '11 at 03:20