获取VS高亮所有的.NET 3.5 SP1的方法调用 [英] Get VS to highlight all .Net 3.5 SP1 method calls

查看:144
本文介绍了获取VS高亮所有的.NET 3.5 SP1的方法调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有在.NET 3.5 SP1了许多新的API。

There are a bunch of new APIs in .Net 3.5 SP1.

短,是有办法,我可以得到VS 2008,以面向.NET 3.5(RC),而不是.NET 3.5 SP1?

Short of uninstalling .Net 3.5 SP1 (or doing dev on a VM), is there a way I can get VS 2008 to target .Net 3.5(RC) as opposed to .Net 3.5 SP1?

有没有一种方法可以让我得到它发出警告时,有一个API不支持3.5 SP1正被调用的?

Is there a way I can get it to issue a warning when there is an API not supported in 3.5 SP1 which is being invoked?

类似的问题:<一href="http://stackoverflow.com/questions/640057/find-$c$c-that-depends-on-net-3-5-sp1">http://stackoverflow.com/questions/640057/find-$c$c-that-depends-on-net-3-5-sp1

推荐答案

这实际上有一个令人惊讶的棘手的答案。

This actually has a surprisingly tricky answer.

首先,要得到这个功能,是提纲<一href="http://davesbox.com/archive/2008/08/25/new-for-visual-studio-2008-sp1-and-fxcop-1-36-multi-targeting-rule.aspx"相对=nofollow>下面的帖子你需要或者最新的或版本的FxCop的VS 2008 SP1。

First of all, to get this functionality that is outline in the following post you will need either the latest version of fxcop or VS 2008 SP1.

一旦你有安装有一个新的规则(在VS 2008 Team System中)被称为便携规则 - >只使用API​​的目标框架

Once you have that installed there is a new rule (in VS 2008 Team System) called Portability Rules -> Use only API from targeted framework.

但是,这还不够

的FxCop目前出货与狡猾的WPF的规则:

Fxcop is currently shipping with dodgy wpf rules:

在上述职位从最后一行引用:

Quote from the last line in the above post:

好像有这个错误   因为它没有抱怨我   引用的IEditableCollectionView   其中加入3.5 SP1。作为一个   事实上,目前好像   C:\ Program Files文件\微软的Visual   工作室9.0 \团队TOOLS \静态分析   TOOLS \ FxCop的\库\兼容性\ Desktop3.5SP1.xml   没有列出任何新的WPF   议会成员。

It seems like there are bugs in this because it didn't complain when I referenced IEditableCollectionView which was added in 3.5 SP1. As a matter of fact, it seems like "C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Static Analysis Tools\FxCop\Repository\Compatibility\Desktop3.5SP1.xml" doesn't list ANY of the new WPF assembly members.

安德鲁,感谢您的反馈意见。您   是正确的,有一个错误。数据   为WPF 3.5 SP1包含,它只是   在3.0 SP2中列出。然而,   优先级属性的文件和   2.0 SP2不正确。我已经转发该信息到我的老东家,在   与此同时,一个解决方法是手动   更改这些文件;对于   Desktop3.0SP2.xml改变优先级   从3020到3520和   Desktop2.0SP2.xml改变优先级   从3015到3515。

Andrew, thanks for the feedback. You are correct, there is a bug. The data for WPF 3.5 SP1 is included, it's just listed under 3.0 SP2. However, the 'Priority' attribute for this file and 2.0 SP2 is incorrect. I've forwarded this information on to my old team, in meantime, a workaround is to manually change these files; for Desktop3.0SP2.xml change the priority from '3020' to '3520' and for Desktop2.0SP2.xml change the priority from '3015' to '3515'.

所以,你需要破解打开cmd,在管理和修复了这些文件,如果你想这个工作。

So you will need to crack open cmd in admin and fix up those files if you want this to work.

一旦做到这一点,它似乎很好地工作。

Once that is done, it seems to work fine.

这篇关于获取VS高亮所有的.NET 3.5 SP1的方法调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆