可移植类库 - 目标 Silverlight 5
可移植类库属性中的“更改目标框架”对话框有一个指向此页面的链接:
http://msdn.microsoft.com/en-us/hh487282.aspx
该页面表明“Silverlight 5 RC Tools Visual Studio”中包含一个 silverlight 5“目标包” 2010 SP1'。
我的假设是 RC 工具被发布的 Silverlight 5 工具所取代 - 尽管有这些工具,但我绝对没有选择 silverlight 5 的选项。
我认为他们可能已将目标包排除在发布工具之外,因此我尝试卸载它们并安装 RC 工具,看看是否会显示针对 silverlight 5 的选项 - 但这似乎也不起作用。
如何使用我的可移植类库瞄准 Silverlight 5?
另外我应该补充一点,我知道 silverlight 4 程序集与 silverlight 5 兼容,但是从 silverlight 5 应用程序中引用 silverlight 4 库会产生其他副作用(例如代码分析/指标不起作用),我正在尝试解决这些问题( “无法统一平台”)因此,对此的修复将同样受到赞赏:)
The "change target framework" dialog in the portable class library properties has a link pointing to this page:
http://msdn.microsoft.com/en-us/hh487282.aspx
Said page indicates that there is a silverlight 5 'targeting pack' included in 'Silverlight 5 RC Tools Visual Studio 2010 SP1'.
My assumption is that the RC tools are replaced by the release Silverlight 5 tools - and I definitely don't have the option to choose silverlight 5 despite having these tools.
Thinking they may have left the targeting pack out of the release tools, I tried uninstalling them and installing the RC tools to see if the option to target silverlight 5 would show up - however that didn't seem to work either.
How can I target Silverlight 5 with my portable class library?
Also I should add, I know that silverlight 4 assemblies are compatible with silverlight 5, however referencing silverlight 4 libraries from within a silverlight 5 application has other side affects (such as code analysis / metrics not working) which I'm trying to resolve ("could not unify the platforms") So a fix to that would be equally appreciated :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可移植类库开箱即用地支持 Silverlight 5,选择 Silverlight 4 将使您能够在 Silverlight 5 上运行。下周发布的 Visual Studio 11 Beta 增加了对 Silverlight 5 的全面支持(如果您将其安装在带有 Visual Studio 的盒子上) Studio 2010,它还将添加 Siverlight 5 支持)
代码分析问题是一个已知问题(如果您引用 RIA 服务并尝试运行代码分析,也会出现同样的问题),不幸的是,没有已知的解决方法。遗憾的是,我们未能及时修复并将其纳入 Visual Studio 11 Beta 中。但是,它会在我们发货时修复。
大卫·基恩(BCL 队)
Portable Class Libraries supports Silverlight 5 out-of-the-box, choosing Silverlight 4 will enable you to run on Silverlight 5. The Visual Studio 11 Beta out next week adds full support for Silverlight 5 (if you install it on a box with Visual Studio 2010, it will also add Siverlight 5 support to it)
The Code Analysis issue is a known issue (the same problem occurs if you reference RIA Services and attempt to run Code Analysis), unfortunately, there's no known workaround. Sadly, we could not get the fix into time to make it into the Visual Studio 11 Beta. It will, however, be fixed by the time we ship.
David Kean (BCL Team)