Sunday, June 11, 2006

Found conflicts between different versions of the same dependent assembly.

Why does this happen? Well it's the mess that comes with managed DirectX version 2.0, something I believe that's still in beta ... anyway it's quite quite different.

Now if you're making a nice new DirectX project, as I'm inclined to do now and again, you add your directx references as per normal. Now, if you're anythingl like me there are a host of DirectX versions to choose from that you've installed over the last few years. Maybe you use the same heurisitic as I do - and choose the one with the biggest version number - well if you choose 2.0, this is a potentially a mistake. Fair enough. The problem is when you try and replace it with an earlier version you might get the error:

Found conflicts between different versions of the same dependent assembly.

Pah. You click okay or whatever - auto resolve it please - but it's stil fails when you try and run the game. Grahhh what's happening?

Well go into the solution explorer and double click on app.config, and remove anythings that mentions DirectX 2.0

And then everything should work. Yay!

The whole reason I wanted a nice new directX project was because I wanted to do some benchmarks for different Tile Rendering methods I've been chatting to z over email about this. I'd always heard of batching but it sounded scary and hard and therefore I never ever looked any closer. But then these emails made it clearer what the problem was, though I still need to read about it :D It's all to do, I think, with the time it takes to send things to the GPU vs the time it takes to do things on CPU. Z's written something about on his blog. So thanks for that, now that I'm able to use DirectX again I'll start my own benchmarks soon.

Still not too programming going on - it's very humid here at the moment, all I want to do is sleep :D

EDIT: a secret for your enjoyment, I'm currently maintaining two technical blogs but one lives only on my local machine. I think next year I'll have some kind of server access to I'll switch then making the local blog public, it's rather better and has quite a bit of content I've not put here because I don't like messy around getting uploads working :D

1 comment:

balaam said...

I'd tried removing the assemblies and then replacing them with the correct ones but it was crashing when I ran the program with an "method not found in assembly exception" or similar.

This maybe because earlier there was a warning of conflicting assemblies. I double clicked on this and was if I'd like Visual Studio to automagically sort everything out for me and I clicked yes :D