有没有办法告诉 Resharper 6 忽略新的异步语言功能?
我终于开始安装 AsyncCtpLibrary。
“async”和“await”关键字为红色,悬停帮助分别包含短语“无法解析符号‘async’”或“无法解析符号‘await’”。
项目 AsyncSamplesCS 编译得很好。
有没有办法告诉 Resharper 忽略这些新的异步语言功能?
例子:
public async void AsyncIntroSingle()
{
WriteLinePageTitle(await new WebClient().DownloadStringTaskAsync(new Uri("http://www.weather.gov")));
}
I finally got around to installing the AsyncCtpLibrary.
The 'async' and 'await' keywords are in red and the hover help has the phrases "cannot resolve symbol 'async'", or "cannot resolve symbol 'await'" respectively.
The project AsyncSamplesCS compiles just fine.
Is there a way to tell Resharper to ignore these new Async language features?
Example:
public async void AsyncIntroSingle()
{
WriteLinePageTitle(await new WebClient().DownloadStringTaskAsync(new Uri("http://www.weather.gov")));
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,除了完全关闭 ReSharper 代码分析之外,没有办法忽略这些关键字。
我们希望能够在今年秋季的 ReSharper 6.1 中提供对 Async 和 Await 的初步支持。这是一个功能请求,如果您愿意,请投票/观看。
No there's no way to ignore these keywords apart from turning ReSharper code analysis off completely.
We hope to be able to provide initial support of Async and Await in ReSharper 6.1 due this Fall. Here's a feature request, vote/watch it if you like.
ReSharper 6.1 抢先体验计划现已开放。 ReSharper 6.1 支持 C# 和 VB.NET 中的 async 和 wait 关键字,并且还提供了一组代码检查和快速修复:例如,当异步方法缺少 wait 运算符时,它会看到死代码,并在您在异步方法中使用错误的返回类型。更多信息请参见:http://blogs.jetbrains.com/dotnet/2011/11/resharper-61-eap-opens-much-more-than-a-bugfix-release/
The ReSharper 6.1 Early Access Program is now open. ReSharper 6.1 support async and await keywords — both in C# and VB.NET — and also provides a set of code inspections and quick-fixes: for example, it sees dead code when an asynchronous method lacks await operators, and warns when you’re using a wrong return type in an asynchronous method. More informations here: http://blogs.jetbrains.com/dotnet/2011/11/resharper-61-eap-opens-much-more-than-a-bugfix-release/