Umbraco 4 broke my project!

Thursday, Feb 5, 2009 2 minute read Tags: umbraco
Hey, thanks for the interest in this post, but just letting you know that it is over 3 years old, so the content in here may not be accurate.

Umbraco 4 may have been out for a week now but I've been busy and I am only slowly getting to upgrading a project I've been working on to the current build.

But I finally got around to it, and because there's a big custom .NET component to it I compiled against the upgraded DLL's, but there was a problem, I got the following compile error:

The referenced assembly 'businesslogic, Version=1.0.3317.32687, Culture=neutral, PublicKeyToken=null' could not be found. This assembly is required for analysis and was referenced by: 'MyProject.dll', 'cms.dll'.

Well that's no good, and from looking at the cms.dll it's right, it expects that, but businesslogic.dll is only version 1.0.3317.17186.

So I re-download the package, may I did something wrong. Nope, that's not it. So I check another person running v4 final. Nope, that's not it.

So I create a new project, add the references. This one compiles.

Then I take a closer look at the output window; doing this I see that the problem is caused during the running of FxCop. Then it hits me, FxCop is trying to bring in all the references, probably via reflection. Because cms.dll is using a difference version it then freaks out!
No one else was using FxCop, nor was the new project I created!

Well there you have it, if you're doing development againt the Umbraco API's be careful that they have released the correct versions to you!