Error when referencing HAPPhone (newb question)

Topics: User Forum
Jun 5, 2011 at 7:18 PM

Sorry for asking such a basic question, but I am absolutely new to Visual Studio and have run into a problem that I don't quite understand how to solve. When trying to reference the Agility Pack (HtmlAgilityPack.dll, Windows Phone version) in an existing Windows Phone project, I get the following error message:

"Reference can not be added, because it was not built using the Windows Phone Runtime. Windows Phone projects will only work with Windows Phone assemblies"

I guess I am missing something very obvious here (project properties or build configuration?), but after hours of trying to figure it out, I still can't seem to find any hints at what I'm doing wrong.

Thank you very much for your help!

Jun 10, 2011 at 5:03 PM

Still haven't been able to fix it.
If someone has any idea of what might be a possible solution, I'd appreciate your help.

Thanks.

 

Jun 11, 2011 at 11:49 AM

Do you by chance have the mango tools installed as well? I just noticed the project file is now referencing SL4 instead of the phone libraries. I'm going to try to recreate it to force it to point to the 7.0 libraries

Jun 15, 2011 at 10:52 AM

Thank you for your help!

No, I don't have the mango tools installed yet. I hope I have understood you correctly and checked the properties: the target framework is set to .NET Framework 2.0.
I have also tried to add "SILVERLIGHT;WINDOWS_PHONE" as conditional compilation symbols as well, to no avail.