Having installed Windows 8 Pro, Visual Studio 2012 Premium and the new Windows Phone 8 SDK, I was keen to make sure that my Windows Phone 7.1 project still built & worked. That meant getting all of the references to work again.
Most of the references were for packages that I could install through Nuget. However, one was for a Zip file that I had to download and unpack. Upon browsing to the appropriate DLL and selecting it as the reference, Visual Studio promptly reported:
A reference to a higher version or incompatible assembly cannot be added to the project
The ultimate solution was to right-click on each of the files that had been contained in the Zip file, choosing Properties and then clicking on the Unblock button. Once that was all done, Visual Studio then allowed me to add the reference, although it did warn me that it might be unstable! Not a lot I can do about that J.
Like this:
Like Loading...
Thanks a lot mate. I had exactly the same problem when importing Flurry Analytics DLL for WP7 You just saved my day
Thanks!!! I had been searching a solution for hours!!
Worked for me too!!
Reblogged this on World Wide Code and commented:
Thanks. I had the same problem for Microsoft.Practices.Prism.Interactivity.dll
Where do you see the “Unblock” option?
When you right-click on the file and choose Properties, it is displayed at the bottom of the window. If you aren’t seeing the button, the file is already unblocked for use.
I can’t see the unblock button and the same means its already unblock to use,right! but i’m not able to add the class library reference to my Windows Phone 8 application and the same error ‘A reference to a higher version or incompatible assembly cannot be added to the project’ appears. Please help me out!
Are there any other files associated with the library? You need to make sure that you have unblocked absolutely every file, and it has to be done one by one as you cannot unblock multiple files.
Where do you see the “Unblock” option?
When you right-click on the file and choose Properties, it is displayed at the bottom of the window. If you aren’t seeing the button, the file is already unblocked for use.
My Class library contain only 3 class files and I can see not any unblock button for the classes. After googling a lot, now I added a PortableClassLibrary but I’m not getting my required namespaces- System.Data,System.Web.Services etc. Please help me out.
I’m sorry but I’m not sure what to suggest. It is possible that there are other reasons for the error being displayed, so all I can suggest is you post to an MSDN forum or to StackOverflow to see if anyone has other suggestions.
Sorry that my information hasn’t helped in your situation.
Thank you for your valuable suggestion and help.
Really thanks!
Thanks!
You saved me a great headache
Cheers.
Awesome, thanks!