开发者

Visual Studio configuration problem after upgrade to VS2010 / XNA 4

I'm attempting to migrate a project from XNA 3.1 in VS2008 to XNA 4 in VS2010.

I realise that there will need to be some code changes, but the problem I am currently facing is that, having been through all project properties attempting to ensure that any references to the old XNA are removed and that appropriate references to XNA 4 are added, I am getting build errors such as

The type 'Microsoft.Xna.Framework.Vector4' is defined in an
assembly that is not referenced. You must add a reference to assembly
'Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, 
PublicKeyToken=6d5c3888ef60e27d'.

and

Cannot implicitly conve开发者_高级运维rt type 'Microsoft.Xna.Framework.Vector4 [c:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.dll]' 
to 'Microsoft.Xna.Framework.Vector4'

Following the declarations of the Vector4s being referred to by the latter error, I can see no evidence that either of them should be any different...

I've tried using Agent Ransack to find which files contain the 6d5c3888ef60e27d key, and killed a few Content.contentproj files etc just in case, but thus far haven't found anything all that useful. I must admit that since first encountering this problem I haven't been very thorough in tracking exactly what I've changed; I might try reverting to an old version where everything worked under VS2008 and going through the process again.

The configuration of the project is somewhat different from a normal XNA game I suppose, and there are C++ elements to it, in case that's relevant.


It's probably an indirect reference that causes this, meaning you have a dll referenced which still uses a 3.1 assembly. Can this be the case? Do any of these have copy local set to true? You can also try cleaning the solution (right mouse button on solution -> clean).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜