![](/img/trans.png)
[英]Find out the source control state of a ProjectItem from a Visual Studio extension
[英]Get identity of logged in Visual Studio user from extension
我正在开发Visual Studio 2015扩展,并希望获得登录IDE的用户的身份(与登录Windows或运行devenv的用户不同)。
我不知道在哪里(或是否可以)获得该信息。 它似乎没有出现在DTE对象中的任何位置,并且四处搜寻并没有帮助。
代码:C#
常规:在标头中/在名称空间上方MVC:不确定较早版本,但不需要3-5
using System.Security.Principal
功能,属性等
string userid= User.Identity.Name.toString()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.