locked
Reference Problem RRS feed

  • Question

  • I'm getting weird errors when trying to compile my solution. I'm using a setup with a WF application (host) tat calls XAML files in a different project, using code activities from a 3rd project (all in the same solution).

    The compiler tells me type or namespace "XYZ" was not found, but that is not true.

    When using intellisense, the namespace is right there and once I use that (exact same text of course), the compiler error disappears...until I compile again. Then the exact same thing happens again.

    I tried this many times, I removed the reference from all 3 projects, recompiled the other solution whose reference I use and then added it again (and copied the .exe file into the bin/debug directories of all 3 workflow projects) but I still get the same error.

    Now sometime the namespace is not found anymore despite me having removed and re-added the reference.

    Is there any way to fix this? It's a new problem and until last week I used the same setup with references to the same .exe file without any problem.

    Monday, August 27, 2012 12:29 PM

Answers

  • Hi,

    I'd suggest you check the target frameworks of each project, make sure they have the same target framework.  You can also disassemble the *.exe assembly and view the assembly manifest to see if the type, reference and namespace are correct.

    How to: View Assembly Contents

    http://msdn.microsoft.com/en-us/library/ceats605.aspx

    To resolve this issue, please try delete the bin and debug folder, then recompile your projects.

    If your problem persists, can you upload a simple project to SkyDrive for us reproduce this issue. Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by LeoTang Monday, September 3, 2012 7:49 AM
    Wednesday, August 29, 2012 7:42 AM