The ZBuffer - Managed DirectX resources
Search ZBuffer
Links


 

Error Message:

Error 1 The type 'Microsoft.DirectX.Direct3D.Device' exists in both
'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll'
 and
'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.Direct3D.dll'

This error message indicates that you are referencing both Managed DirectX 1.1 and Managed DirectX 2.0 in the same project. Since both assemblies contain the Device class (and many others) there is obviously a conflict. Confusion also occurs because Managed DirectX 1.1 has multiple assemblies (.DirectX, .Direct3D, Direct3DX etc) whereas Managed DirectX 2.0 has only a single one (.DirectX) which includes all of the classes. See Managed DirectX files and directory structures

Solution: Remove one of the references. The Managed DirectX 1.1 assemblies will be version 1.0.29xx.0, the Managed DirectX 2.0 assemblies will be version 2.0.0.0. If you choose to go with Managed DirectX 2.0 remember to remove *all* of the Managed DirectX 1.1 assemblies.

Updated 4/15/2006 8:00:00 AM by Zman