Silverligh 5 SDK RC +异步 CTP:让它发挥作用
刚刚安装了 Silverligh 5 SDK RC。在使用异步 CTP 的项目中使用它时出现问题。
AsyncCtpLibrary_Silverlight.dll 和 mscorlib.dll 都包含位于完全相同的命名空间中的任务类型(以及一些其他任务相关类型)。
这是错误消息:
因此,为了解决这种歧义,我将 AsyncCtpLibrary_Silverlight.dll 上的别名更改为“AsyncCtp”。然后相应地更改了cs文件:
extern alias AsyncCtp;
using AsyncCtp::System.Threading.Tasks;
using AsyncCtp::System.Threading;
这似乎解决了歧义问题,但现在“async”关键字不被识别。这些是相关错误:
有解决办法吗,还是死胡同?
Just installed the Silverligh 5 SDK RC. There is a problem using it inside a project that uses the Async CTP.
Both AsyncCtpLibrary_Silverlight.dll and mscorlib.dll contains the Task type (And some other Task related types) that is sitting in the exact same namespace.
Here is the error msg:
So to solve this ambiguity I changed the Alias on the AsyncCtpLibrary_Silverlight.dll to "AsyncCtp". And then changed the cs file accordingly:
extern alias AsyncCtp;
using AsyncCtp::System.Threading.Tasks;
using AsyncCtp::System.Threading;
This seems to solve the ambiguity problem, but now the "async" keyword is not recognized. These are the related errors:
Is there a way around it, or is it a dead end ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决这个问题的唯一方法是重新编译 AsyncCtpLibrary_Silverlight.dll 并从其中删除所有 TPL 类型。但我不会打扰...查看异步 CTP 上的公告 论坛:
更新:异步 CTP v3 已发布,支持 Silverlight 5:http://blogs.msdn.com/b/pfxteam/archive/2011/11/01/10232099.aspx
The only way around it would be to recompile the AsyncCtpLibrary_Silverlight.dll and remove all the TPL types from there. But I wouldn't bother... Check out the announcement at the Async CTP forum:
Update: Async CTP v3 was released with Silverlight 5 support: http://blogs.msdn.com/b/pfxteam/archive/2011/11/01/10232099.aspx