Wfc, xoml and version info

I am trying to compile a xoml file using wfc.exe and the xoml file has references to members in other .net dlls.

When I try to compile,

wfc.exe workflow.xoml /reference:bin\debug\workflow.dll;bin\debug\other.dll

/out:CamWorkflow.xoml1.cs

I am getting the error

error 279: Could not create activity of type 'Workflow'.
System.TypeLoadException: Could not load type 'IWorkflowEvents' from assembly 'Workflow, Version=0.0.0.0, Culture=neutral, PublicKey
Token=null'.
at Msn.Ads.Cam.Workflow.CamWorkflow.InitializeComponent()
at Msn.Ads.Cam.Workflow.CamWorkflow..ctor()

Version of the workflow dll is 3.0.0.0.

Where do I mention the version info in the xoml

Thanks

Pravin



Answer this question

Wfc, xoml and version info

  • Rahul Agarwal

    You just need to reference the assembly that contains the defintion for IWorkflowEvents.

  • amit Kumar

    Initially I was referring to the unsigned version of the dll and I was getting these errors. Once I referred to the signed version of the dll, it is working fine.
  • popskie

    Here's my Xaml

    <StateMachineWorkflowActivity x:Class="Workflow" InitialStateName="State1" x:Name="Workflow1" CompletedStateName="State2" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow">

    <StateActivity x:Name="State1">

    <EventDrivenActivity x:Name="Event1">

    <HandleExternalEventActivity Invoked="Invoked1" x:Name="handleEventActivity" EventName="Event2" InterfaceType="{x:Type IWorkflowEvents}" />

    <SetStateActivity x:Name="StateActivity" TargetStateName="State2" />

    </EventDrivenActivity>

    </StateActivity>

    <StateActivity x:Name="State2" />

    <x:Code>

    private void Invoked1(object sender, ExternalDataEventArgs e)

    {

    }

    </x:Code>

    </StateMachineWorkflowActivity>


  • Omid_

    It would be helpful if you post your XAML - but I am guessing your namespace attribute declaration isn't correct.

  • Wfc, xoml and version info