简体   繁体   English

silverlight工具包参考问题

[英]silverlight toolkit reference issue

i installed the august 2011 windows phone silverlight toolkit from http://silverlight.codeplex.com/ . 我从http://silverlight.codeplex.com/安装了2011年8月推出的windows phone silverlight工具包。

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. 安装(并重新启动计算机)后,我尝试重新引用silverlight工具包(位于C:\\Program Files (x86)\\Microsoft SDKs\\Windows Phone\\v7.1\\Toolkit\\Aug11\\Bin\\Microsoft.Phone.Controls.Toolkit.dll我的VS项目中的C:\\Program Files (x86)\\Microsoft SDKs\\Windows Phone\\v7.1\\Toolkit\\Aug11\\Bin\\Microsoft.Phone.Controls.Toolkit.dll )。

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 ". 当我尝试这样做时,我得到一个错误说“ 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 windows phone. 我的VS是Windows Phone的Visual Studio Express版。

To be noted, in the reference list, i also have included Windows.Phone and Windows.Phone.Controls (refering to the "higher version" maybe) 需要注意的是,在参考列表中,我还包括了Windows.Phone和Windows.Phone.Controls(可能参考“更高版本”)

Allow visual studio to reference those dll by unblocking that dll. 允许visual studio通过解锁该dll来引用这些dll。

  1. Right-click on each of the dll file that you want to reference 右键单击要引用的每个dll文件
  2. 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/ 参考: 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. 该工具包的8月版专门针对SDK的7.1版本。
You'll get this message if the application you're trying to reference this from targets 7.0. 如果您尝试从目标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. 要升级您的应用程序,请在解决方案资源管理器中右键单击该项目,然后选择“升级到Windows Phone 7.1”选项或在项目属性页面中选择该选项。

It's very simple. 这很简单。 Just right-click on that DLL file and click on properties, then click Unblock (at the bottom). 只需右键单击该DLL文件并单击属性,然后单击“ 取消阻止” (位于底部)。

Found the problem. 发现了问题。 The project was compiled to be 7.0 and the silverlight was for 7.1 sdk. 该项目编译为7.0,银光为7.1 sdk。 Just set the project to 7.1 只需将项目设置为7.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM