Is it a Bug?

I have used Visual Studio 2005 and workflow foundation beta 1.2, and I met a weird problem. when I used WebServiceReceive Activity and compiled, the VS showed the error message: property 'xxxx' has invalid value, Field type 'xxxxxxxxxxx' doesn't match with the expected type 'xxxxxxxxxxx' . But actually it did match. And the stranger thing is after I unload the project and reload it , it compiled successfully! Why Every time I met the compiling error, I should unload the project and reload it.
 
Another problem is for chinese input: It still compiled fail after I saved all the files with UTF-8 encoding. The problem seems with the activity InterfaceType and MethodName. After I change the Chinese chars to English of the file referenced by the activity InterfaceType, it compiled successfully.
 
The third thing is for the workflow designer. Every time I opened the workflow form in VS, it showed a warning box: Object reference not set to an instance of an object.


Answer this question

Is it a Bug?

  • jludmir

    To Devinder Singh:

    Thanks for your help.

    I am glad to hear from you that the question 1 has been fixed in beta2. Beta2 will be available for download on January, is it

    For the scenario of question2: I used WebServiceReceive activity in a EventDriven activity. I gave a chinese name to the WebServiceReceive activity, it is OK. But when I configured the InterfaceType and methodName of the WebServiceReceive activity, I build a C# interface with chinese name and some method with chinese names, and if I configure the interfaceType and methodName with the chinese-name interface and methods, it compiled error.

    For the question 3 :  Yes  I  open the same  workflow  mentioned in question1 and 2. I have added the workflow to a workflow project. I double-click the workflow.cs in vs, and it open the workflow diagram for design. It is OK for design , except the warning box : Object reference not set to an instance of an object.


  • Kerry007

    Zhuang,

    I am trying to repo your problem nr. 2 and nr. 3. In beta2 both issues aren't appearing any more. The difference of my environment from yours is that I use german characters and I have english Win2003 and english Visual Studio.

    Can you provide more information about your environment. Do you have a chinese or english OS What is your regional locale set to Are you using a chinese or english version of Visual Studio

    Thanks



  • Kerpoise

    Joao Cunha Lopes

    this Beta1 issue is due to caching problem. Visual Studio does not update referenced type. Try following workaround:

    - close Visual Studio

    - find on the machine all instances of the assembly that defines type Prototype5Workflow.Check and delete all of them. (if this is Prototype5Workflow.dll, find all Prototype5Workflow.dll and delete them)

    - open Visual Studio and rebuild your solution

    hope this helps



  • SuperMouse

    Look here


  • Shital

    On the post that Stefan pointed out one can read:

    "After a referenced activity type is changed the old type is still loaded in application domain, and the new properties are not visible. If you close and reopen Visual Studio, it should build fine."

    Actually it's not fine.

    I have had exactly the same problem as reported by Zuhang:

    "property 'xxxx' has invalid value, Field type 'xxxxxxxxxxx' doesn't match with the expected type 'xxxxxxxxxxx' . But actually it did match."

    Closing Visual Studio and reopening Visual Studio does solve the problem for a few compiles. Sometimes the problem comes right back, other times it takes 2 maybe 3 compiles and it's back again.

    So closing and reopening is not an efective workaround.

    I have tryead almost every trick in the book...

    Any sugestion for a workaround while Beta 2 is not out

    Txs.

    John

    PS: Here is my code sample (_receivedCheck and _selectedCheck are the variables causing problems):

    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Collections;
    using System.Drawing;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.Runtime;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;

    namespace Prototype5Workflow
    {
    public sealed partial class Workflow1 : SequentialWorkflow
    {
    public Workflow1()
    {
    InitializeComponent();
    }

    private Prototype5Workflow.Check _receivedCheck = new Prototype5Workflow.Check();
    private Prototype5Workflow.Check _selectedCheck = new Prototype5Workflow.Check();

    public Prototype5Workflow.Check receivedCheck
    {
    get { return _receivedCheck; }
    set { _receivedCheck = value; }
    }

    public Prototype5Workflow.Check selectedCheck
    {
    get { return _selectedCheck; }
    set { _selectedCheck = value; }
    }
    }
    }


  • Shailesh Patel

    I deleted the "bin" and "obj" directories inside the Prototype5Workflow project.

    It does compile the first time, but the problem is allways reapering.

    No it did not help, but txs anyway.

    Any other sugestion

    I guess I'll have to wait for Beta 2.

    Regards

    John


  • BigDaddyOKC

     ZhuangYicheng wrote:
    To Devinder Singh:
    Beta2 will be available for download on January, is it

     

    Yes, Beta 2 is scheduled for later this month (January).

     

    James Conard | Group Manager - Enterprise & App Server Evangelism | http://blogs.msdn.com/jamescon | http://www.WindowsWorkflow.net



  • Twigg

    ghenap:

    I use a chinese OS (window XP, sp2). And I use a English Visual Studio 2005 (RTM).  The regional locale is set to "zh-CN".

  • aloulou_2007

    Hi Zhuang,
     
    The first problem in your post is for the reason Stefan pointed out. Yes it is a Bug in Beta 1.2 and is fixed in Beta2.
     
    Now to your other two questions
     
    Second Question> Another problem is for chinese input: It still compiled fail after I saved all the files with UTF-8 encoding. The problem seems with the activity InterfaceType and MethodName. After I change the Chinese chars to English of the file referenced by the activity InterfaceType, it compiled successfully.
     
    I am not sure I completely understand this scenario. Could you please provide a little more details. 1. Which activity are you configuring 2. Where are you changing the Chinese chars to English
     
    The third thing is for the workflow designer. Every time I opened the workflow form in VS, it showed a warning box: Object reference not set to an instance of an object.
    I do not understand this either. When you say you open the Workflow form in VS do you mean you are opening the Workflow that you mentioned in Questions 1 and 2 in the VS or some other Workflow Also are you adding this workflow to a workflow project
     
    I will try my best to answer the questions once you provide me the details.

  • Offirh

    It seems a little different.........but anyway , thanks a lot! Do you have met the other strange question I mentioned above

  • Is it a Bug?