Thursday 9 June 2011

Could not load file or assembly 'XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

This started happening all of a sudden when I tried to build or rebuild my VS2010 solution. This was because some of the projects in the solution target different platforms (mixed platforms).

I fixed this by going to the Configuration Manager... which is in the drop-down of your configurations (Debug, Release etc.) in VS2010. Then I set "Active solution platform" drop-down to "Any CPU".

I rebuilt the solution and it succeed in compiling.

Tuesday 7 June 2011

Host file not working

I had my website folder e.g. C:\www\wesbite1
I created an IIS 7.5 website e.g. Website1 with the host name = website1.dev
I pinged website1.dev and received a reply

Then when I goto http://website1.dev I get an error:

Cannot find server - DNS fail

What the hell?

Then I remembered that I'm using a proxy and I had to ignore website1.dev in the proxy settings of my browser. This can be found in Firefox > Options > Advanced > Network > Connection Settings > No proxy for:

Hope this helps.