对 Silverlight Toolkit 的程序集引用未在 Windows Phone 7 项目中更新

发布于 2024-10-12 03:44:42 字数 575 浏览 2 评论 0原文

我在 Silverlight Toolkit for Windows Phone 7 中做了一些更改,更具体地说,我做了 内部静态类转换 公共 => 公共静态类 Transitions

以及以前的私有静态方法 GetStoryboard 方法 public: public static Storyboard GetStoryboard(string name)

因为我想使用 Transitions.GetStoryboard 从 Toolkit 加载 Storyboard 并直接在我的代码中使用该 Storyboard。因此,我重建了 Toolkit,在我的 Phone App 项目中,我首先删除了引用,然后再次添加了引用(我肯定选择了正确的 .dll),但我无法访问 Transition 类。 Visual Studio 说:“由于其保护级别,‘Microsoft.Phone.Controls.Transitions’无法访问”

不知何故,程序集引用未更新。我已经尝试了一切。我删除了 Bin 文件夹,在调试和发布版本之间切换,等等,但没有任何效果。有什么建议吗?

I made some changes in the Silverlight Toolkit for Windows Phone 7, more specifically, I made the
internal static class Transitions
public =>
public static class Transitions

and also the formerly private static method GetStoryboard method public:
public static Storyboard GetStoryboard(string name)

because I wanted to use Transitions.GetStoryboard to load a storyboard from the Toolkit and use that storyboard directly in my code. So, I rebuilt the Toolkit, and in my Phone App project, I first deleted the reference, then added the reference again (I've definitely selected the right .dll), but I don't get access to the Transition class. Visual Studio says: "'Microsoft.Phone.Controls.Transitions' is inaccessible due to its protection level"

Somehow, the assembly reference is not updated. I've tried everything. I've deleted the Bin-folders, switched between Debug and Release build, etc. nothing did work. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写下不归期 2024-10-19 03:44:42

我遇到了同样的问题。编译器总是从以下位置选择 silverlight 工具包程序集

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Aug11

无论我是否安装了较新版本的工具包:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Oct11

或者即使我从 VS IDE 显式设置引用路径。我通过使用 HintPath 修改我的 .csproj 解决了这个问题

 <Reference Include="Microsoft.Phone.Controls.Toolkit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604,processorArchitecture=MSIL" >
 <HintPath>C:\WP_Development\WindowsPhoneToolkit\Source and Samples\Bin\Debug\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
 </Reference>

,但我仍然无法理解为什么当从 Visual Studio IDE 中设置路径时 VS 完全忽略用户定义的路径。

I ran into the same issue. The compiler is always picking the silverlight toolkit assembly from

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Aug11

regardless that I have a newer version of the toolkit installed in:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Oct11

or even if I set explicitly the reference path from the VS IDE. I solved the issue by modifying my .csproj with a HintPath

 <Reference Include="Microsoft.Phone.Controls.Toolkit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604,processorArchitecture=MSIL" >
 <HintPath>C:\WP_Development\WindowsPhoneToolkit\Source and Samples\Bin\Debug\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
 </Reference>

This works, but I still can't understand why VS completely ignores the user defined path when the path is set from within the Visual Studio IDE.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文