Microsoft Expression »

[29 Jun 2010 | 0 Comments]

This is a short promotional video about something called Sketchflow which can be found in Microsoft Expression Studio 4. I thought it looked pretty cool so thought I would share it.

It is a collaboration tool to help prototype the functionality of a site and allows the customer to view and comment on the prototype via a web browser using Silverlight – which is pretty cool.

I have downloaded it and when I’ve had a good play around I’ll create a longer post with what I think of it but in the meantime if you can spare 90seconds to watch the video please do!


[25 Jun 2010 | 0 Comments]

This is a short article about a workaround for a really annoying problem I had when trying to run some unit tests in visual studio. The tests would not run because of the following error:

The location of the file or directory ‘c:\projects\bowlingkata\bowlingscorelib_test\bin\debug\Rhino.Mocks.dll’ is not trusted

My situation

I’m working on a large Microsoft Dynamics Crm project at the moment. Dynamics Crm has something called Plugins which fire when something is saved. However they are not the easiest things to unit test so I decided to follow Luis Rocha’s article on how to use Rhino Mock to help.

Looked good, so I created a test but it didn’t run. A quick look on google lead me to David Starr’s article which was the same problem. I tried the unblock thing but it didn’t seem to work.

I asked myself the question, why was this .dll blocked? The answer was because I downloaded it from the Internet onto straight onto my development machine.

The solution

The solution was to download the Rhino.Mocks.dll onto another computer on the network first then copy it to my development machine. This way the Rhino.Mocks.dll came onto my development machine from a trusted source.

After this my tests ran. A real WTF moment!


[3 Jun 2010 | 0 Comments]

I hope that this post might help a few people who have been having the same problem as me.

I have been creating a custom workflow for my project that can calculate working days for the organisation. This went really well until I tried to deploy it to my Crm instance. All I was getting back from the Plugin Registration Tool was:

Creating CRM Connection...
* 1 Duplicate Solutions Deleted
Solution Registered: Thg.Ohov.Crm.Core.Plugins
*** Error occured execution Request
*** <error>
  <description>An unexpected error occurred.</description>

This was no help. I tried changing a few things in my workflow but it kept errorring. To get some more information about the error I downloaded the Crm Diag Tool and turned on tracing. The trace had the following entry:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Thg.Ohov.Crm.Core.Plugins.CrmWorkflows.CalculateWorkingDays' threw an exception. ---> System.ArgumentException: Type 'Thg.Ohov.Crm.Core.Plugins.CrmWorkflows.CalculateWorkingDays' does not define a static dependency property with name 'InputStartDatePropertyProperty'.
Parameter name: ownerType

The clue was the phrase:

'Thg.Ohov.Crm.Core.Plugins.CrmWorkflows.CalculateWorkingDays' does not define a static dependency property with name 'InputStartDatePropertyProperty'

I didn’t define the property called ‘InputStartDatePropertyProperty’ I had just called it ‘InputStartDateProperty’

I then found by renaming the property to just ‘InputStartDate’ fixed the problem:

public static readonly DependencyProperty InputStartDateProperty =
           DependencyProperty.Register("InputStartDate", typeof(CrmDateTime), typeof(CalculateWorkingDays));

That was the fix! I hope that helps someone out there ;)