Pregunta

I have created a simple XNA Windows Class Library with XNA 4.0 called "NivekGameEngine". I have created a simple game for the Windows platform, and I can access all contents of my dll just fine.

The problem comes when I try to make a copy of this project for the Xbox 360. I get this as the error:

The primary reference "NivekGameEngine01" could not be resolved because it has an
indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the
currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve
this problem, either remove the reference "NivekGameEngine01" or retarget your 
application to a framework version which contains "mscorlib, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089".

I look back at my project that created my dll file, and the target is set to "4.0 Client"

Is there a way of fixing this? I will upload code if necessary.

¿Fue útil?

Solución

I believe the issue is that you either need to target the .Net Compact Framework or Silverlight (not 100% sure which) for XBox 360 development. The full .Net framework, including the Client Profile version, doesn't appear to be supported.

So you will either need to rebuild your DLL for one of these environments or, if it is used in other applications, create a second project for the appropriate platform and add references to the files in the original project. You may find that you will need to add conditional compile statements to the source code if you are using features or method overloads that are not supported on the platform.

This is all very doable: we have one set of source code that services the full framework, Compact Framework, Silverlight, and Mono.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top