0
votes

Basically here is my problem, I attached a WriteLine primitives on the designer, I input Hello World, then run it, it works perfectly fine.

Then I add an argument which you can see here, I deleted the Hello World message first, since I want to receive input from user.

enter image description here

Then on Program.cs, here is my basic code:

static void Main(string[] args)
    {
        // Get data from user, to pass to workflow.
        Console.WriteLine("Please enter the data to pass the workflow: ");
        string wfData = Console.ReadLine();

        // Package up the data as a dictionary.
        Dictionary<string, object> wfArgs = new Dictionary<string, object>();
        wfArgs.Add("MessageToShow", wfData);

        // Pass to the workflow.
        Activity workflow1 = new Workflow1();
        WorkflowInvoker.Invoke(workflow1, wfArgs);

    }

But after cleaning, and multiple rebuilds on my code, the same "Hello World" still appears on my system. I cannot input any data since its showing the previous WriteLine message that I have set. As you can see on the first image, I already deleted the message, and replace it with an argument namely "MessageToShow".

enter image description here

I am not sure if this is an error on Visual Studio 2015 Professional edition.

1
Copied your code and duplicated the workflow in VS 2017, and it works as you'd expect. If you haven't already done so, I'd suggest creating a new solution.andyb

1 Answers

0
votes

Try to manually delete the bin and obj folders in your solution. Sometimes VS gets out of sync with the designer changes you make.