<integration> <microsoft> <components> <host_time_sync> <enabled type="boolean">false</enabled> </host_time_sync> </components> </microsoft> </integration>Obviously, you should open vmc file with editor like notepade...
Save to delicious
0 saves
Technical experiments and advices on Microsoft technology, Web Application and SharePoint platform in particular.
<integration> <microsoft> <components> <host_time_sync> <enabled type="boolean">false</enabled> </host_time_sync> </components> </microsoft> </integration>Obviously, you should open vmc file with editor like notepade...

My xaml file hasn't the code behind because I built my workflow in declarative manner. If you take look at xml you could see:
<SequentialWorkflowActivity x:Name="Workflow1" xmlns:ns0="clr-namespace:MyWorkflowLibrary.Task; Assembly=MyWorkflowLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"> <ns0:HelloWorldTask x:Name="helloWorldTask1" /> </SequentialWorkflowActivity>Note that I remove the x:Class attribute in SequentialWorkflowActivity. I do that because I haven't the compiled class in the code behind. In namespace attribute I add the reference to the assembly container of my activity, because this will be resolved at runtime. The console application "Main" looks something like this:
static void Main(string[] args) { // Here, I read my xaml file containing my declarative workflow var xmlReader = new XmlTextReader( new StringReader( File.ReadAllText( @"C:\Users\simonem\Documents\Visual Studio 2008\Projects\ TestWorkflow\MyWorkflowLibrary\HelloWorld.xoml"))); var runtime = new WorkflowRuntime(); runtime.StartRuntime(); runtime.WorkflowCompleted += delegate { Console.WriteLine("WorkFlow completed"); Console.Read(); }; try { var instance = runtime.CreateWorkflow(xmlReader); instance.Start(); } // Here I manage potential workflow validation exceptions catch(WorkflowValidationFailedException wfve) { var errorValidation = string.Empty; foreach (var error in wfve.Errors) { // StringBuilder is better... errorValidation += Environment.NewLine + error.ErrorText; } Console.WriteLine(errorValidation); } // General exceptions catch (Exception ex) { Console.WriteLine(ex.Message); } Console.Read(); }Troubleshooting:
<SequentialWorkflowActivity x:Name="Workflow1" xmlns:ns0="clr-namespace:MyWorkflowLibrary.Task; Assembly=MyWorkflowLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow">