silverlight toolkit reference issue
i installed the august 2011 windows phone silverlight toolkit from http://silverlight.codeplex.com/ .
After installing (and restarting the computer), i try to refference the silverlight toolkit( located in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Aug11\Bin\Microsoft.Phone.Controls.Toolkit.dll
) in my VS project.
When i try to do this, i get an error saying "A reference to a higher version or incompatible assembly cannot be added to the project
". Why is this and how can i fix it? My VS is Visual Studio express edition for开发者_StackOverflow windows phone.
To be noted, in the reference list, i also have included Windows.Phone and Windows.Phone.Controls (refering to the "higher version" maybe)
Allow visual studio to reference those dll by unblocking that dll.
- Right-click on each of the dll file that you want to reference
- select Properties and then click on the Unblock button.
Reference: http://pcmusings.wordpress.com/2012/10/31/vs2012-windows-phone-and-the-reference-to-a-higher-version-error/
The August version of the toolkit specifically targets version 7.1 of the SDK.
You'll get this message if the application you're trying to reference this from targets 7.0.
To upgrade your app, right click on the project in Solution Explorer and select the 'Upgrade to Windows Phone 7.1' option or select the option in the project properties page.
Found the problem. The project was compiled to be 7.0 and the silverlight was for 7.1 sdk. Just set the project to 7.1
It's very simple. Just right-click on that DLL file and click on properties, then click Unblock (at the bottom).
精彩评论