locked
The type or namespace name 'WoWDotNetAPI' could not be found (are you missing a using directive or an assembly reference?) RRS feed

  • Question

  • Hello Everyone,

     

    I'm having a puzzling problem that I am unsure how to resolve.

     

    First things to know:

    1) I have compiled the .dll I am referencing.

    2) I have added the .dll as a reference to my project.

    3) I have added the proper usings to my project (depicted in the images below).

    4) Everything shows correctly until I build (also depicted in the images below).

     

    Image 1:

    This image depicts how the environment appears before a build. I was able to add the usings through intellisense. I was also able to see the classes used (RealmExplorer and Realm) through intellisense.

    http://imgur.com/ALwuE

     

    Image 2:

    This image depicts how the environment appears after a build. It seems as though the reference works perfectly as expected until the solution is built. Is there any explanation for this?

    http://imgur.com/1ld4q

     

    Thank you for your time.

    Saturday, May 28, 2011 12:00 AM

Answers

  • OK, the warning indicates that for your windows form project you can resolve the issue by going to your project Build settings and selecting the full .Net 4.0 Framework as the target framework for the project.

    However, I don't think this will resolve the issue for your Windows phone project, because I don't think the full .Net 4.0 Framework is actually an option there - instead Windows phone is closer to the Silverlight framework.

    Basically this means your WOWDotNetAPI library that you are referencing has a good chance of not working on Windows Phone without recompilation to target that platform.
    Tim

    • Marked as answer by Jmachol90 Monday, May 30, 2011 2:49 AM
    Sunday, May 29, 2011 8:51 PM

All replies

  • If this thread is in the wrong section of the forum, please let me know which section it should be in and I will move it there.

     

    Thank you.

    Saturday, May 28, 2011 4:38 PM
  • Hi, this doesn't sound WF related, but I'm not sure which forum section is the right one either. It's also hard to guess what the problem is, but I do wonder if it's somehow related to the way you referenced the dependent assembly/project, or customizations happening in your build. Aside from that I see there is 1 warning (not shown) - is the warning about not finding the referenced assembly by any chance? Posting the XML content of your .csproj, the warning, or other information from the build logs might possibly help people figure it out.
    Tim
    Sunday, May 29, 2011 8:19 AM
  • Hi, this doesn't sound WF related, but I'm not sure which forum section is the right one either. It's also hard to guess what the problem is, but I do wonder if it's somehow related to the way you referenced the dependent assembly/project, or customizations happening in your build. Aside from that I see there is 1 warning (not shown) - is the warning about not finding the referenced assembly by any chance? Posting the XML content of your .csproj, the warning, or other information from the build logs might possibly help people figure it out.
    Tim

    Hi Tim,

    Thank you for your reply. The hidden warning seems to be as follows:

    Warning 1 The referenced assembly "WowDotNetAPI.Explorers" could not be resolved because it has a dependency on "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. WowDotNetAPI_Test

    The above is the warning I get for a Windows Forms project; however, the main reason I am working with this is to learn more about Windows Phone 7 and Silverlight. The following are the two warnings I receive when attempting the above through a Silverlight for Windows Phone project:

    Warning 3 Reference to type 'System.Net.WebClient' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\System.dll', but it could not be found c:\Users\Josh\Desktop\briandek-WowDotNetAPI-0f195f4\Explorers\bin\Debug\WowDotNetAPI.Explorers.dll WoWDotNetAPIT WindowsPhone Test

    Warning 7 Reference to type 'System.Func`2' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\mscorlib.dll', but it could not be found c:\Users\Josh\Desktop\briandek-WowDotNetAPI-0f195f4\Explorers\bin\Debug\WowDotNetAPI.Explorers.dll WoWDotNetAPIT WindowsPhone Test

    Sunday, May 29, 2011 7:27 PM
  • OK, the warning indicates that for your windows form project you can resolve the issue by going to your project Build settings and selecting the full .Net 4.0 Framework as the target framework for the project.

    However, I don't think this will resolve the issue for your Windows phone project, because I don't think the full .Net 4.0 Framework is actually an option there - instead Windows phone is closer to the Silverlight framework.

    Basically this means your WOWDotNetAPI library that you are referencing has a good chance of not working on Windows Phone without recompilation to target that platform.
    Tim

    • Marked as answer by Jmachol90 Monday, May 30, 2011 2:49 AM
    Sunday, May 29, 2011 8:51 PM
  • OK, the warning indicates that for your windows form project you can resolve the issue by going to your project Build settings and selecting the full .Net 4.0 Framework as the target framework for the project.

    However, I don't think this will resolve the issue for your Windows phone project, because I don't think the full .Net 4.0 Framework is actually an option there - instead Windows phone is closer to the Silverlight framework.

    Basically this means your WOWDotNetAPI library that you are referencing has a good chance of not working on Windows Phone without recompilation to target that platform.
    Tim

    Alright, awesome, Tim.

    Thank you so much for your help. I will see if there are classes that I can use to do the same thing on Windows Phone. I wonder if the Mango release will add more features such as the one that currently seems to be missing? Serializing JSON data.

     

    Thanks again for your help, Tim! Have a great day.

    Sunday, May 29, 2011 9:05 PM