简体   繁体   English

如果获得基本身份验证,Visual Studio是否可以访问TeamCity符号服务器?

[英]Can Visual Studio access TeamCity symbol server if basic auth is rquired?

I have TeamCity symbol server plugin working and can pull symbols & source from VS2017 as expected as long as I allow guest login in TeamCity and guest has appropriate rights. 我有TeamCity符号服务器插件工作,只要我允许访客在TeamCity中登录并且guest有适当的权限,就可以按预期从VS2017中提取符号和来源。

However, the required rights are quite permissive (allows downloading source code). 但是,所需的权限是非常宽松的(允许下载源代码)。 This is a private, commercial team, so I don't want to allow public/guest access. 这是一个私人的商业团队,因此我不想允许公共/访客访问。 I'd like it to be authenticated, but can't seem to get VS2017 to prompt for credentials or pass them on the URL configured in VS2017's Debugging>Symbols settings ( https://user:pass@my.teamcity.com ). 我希望它经过身份验证,但似乎无法让VS2017提示输入凭据或将其传递给VS2017的调试>符号设置( https://user:pass@my.teamcity.com )中配置的URL。 The output window always shows "Symbol server authentication failed". 输出窗口始终显示“符号服务器身份验证失败”。

Not sure if it's a limitation of VS or I'm not configuring it properly. 不确定它是否是VS的限制或我没有正确配置它。 Does anyone know if/how this is possible? 有谁知道这是否可行?

EDIT: Looks like it is a bug . 编辑: 看起来这是一个错误 (Thanks @mmchenry for the bug report link.) According to a comment it will be fixed in an upcoming release. (感谢@mmchenry提供的bug报告链接。) 根据评论 ,它将在即将发布的版本中修复。 In the meantime, the workaround below can be used. 与此同时,可以使用下面的解决方法。


I think this might be a new bug in VS 2017. After updating to 15.3, I can't get the authentication prompt to appear. 我认为这可能是VS 2017中的一个新错误。更新到15.3后,我无法显示身份验证提示。 It used to appear regularly. 过去经常出现。 Now, symbol information always fails due to the error you list: Symbol server authentication failed . 现在,由于您列出的错误,符号信息总是失败: Symbol server authentication failed

I have a workaround though. 我有一个解决方法。 The symchk.exe utility in the Windows SDK downloads symbols. Windows SDK中的symchk.exe实用程序下载符号。 With the Win10 SDK, you can find symchk here: c:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64\\symchk.exe 使用Win10 SDK,您可以在此处找到symchk: c:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64\\symchk.exe

Here's an example of how to use it (powershell): 这是一个如何使用它的例子(powershell):

& "c:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symchk.exe" `
  "C:\path\to\Your.dll" /r /v /s `
  "srv*c:\symcache*https://my.teamcity.com/app/symbols"

This still provides a UI prompt to get credentials, then downloads to the symbol cache, where you can get Visual Studio to load from in the Debug->Symbols options: 这仍然提供获取凭据的UI提示,然后下载到符号缓存,您可以在Debug-> Symbols选项中从中加载Visual Studio:

Visual Studio调试符号选项缓存

This is now fixed in 15.5. 现在已在15.5中修复。 It's not listed in the release notes as far as I can tell, but a MS rep commented that it was fixed in 15.5 , so I gave it a try. 据我所知,它没有在发行说明中列出,但MS代表评论它已在15.5中修复 ,所以我试了一下。

After I installed 15.5, it didn't prompt me for credentials at first. 安装15.5之后,它最初没有提示我输入凭据。 So I deleted/re-added the symbol server setting and cleaned the symbol cache. 所以我删除/重新添加了符号服务器设置并清理了符号缓存。 Then on the next run it prompted me for credentials, successfully downloaded the symbols and allowed me to debug the assembly. 然后在下一次运行时它提示我输入凭据,成功下载符号并允许我调试程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM