I have Jenkins CI server which builds various .net projects. The server is on Virtual Machine, connected to ActiveDirectory and Jenkins is running in the context of domain user which is also a local administrator.
Software used:
Solutions are build using devenv.com (currently msbuild is not an option), e.g.:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" "xxxxx.sln" /rebuild "Release|Any CPU"
My issue is, that quite often I receive an error, just after running devenv.com:
Microsoft Visual Studio has detected a configuration issue. To correct this, please restart as Administrator. For more information please visit: http://go.microsoft.com/fwlink/?LinkId=659046Build
It started to happen after one of Windows 10 updates. I found out, that when someone is log in to build server with the remote desktop using the same domain account, the builds run OK. After logout, the builds run OK for some time and then the errors are back.
Any clue what's going on?
It may be related to this apparent bug in a recent Windows update:
Connect: Visual Studio 2015 and SSMS 2016 RTM (VS 2015 shell) not running under "Run as different user" on Windows 10 Anniversary, Windows 2016 CTP 5
UPDATE 2017-09-08
The Connect issue Unable to start SSMS as another user (cached copy on archive.org) makes me think it would be worth checking whether the problem resolves after updating Windows 10 to 1703 (Creators Update) and ensuring that April 25, 2017—KB4016240 (OS Build 15063.250) has been applied. If this works, anyone running Jenkins on Windows Server 2016 will have to wait for Microsoft to publish 1703 and KB4016240 (or equivalent) for that OS.
Excerpts from Connect page "Unable to start SSMS as another user". I have bolded the error details, which match those in the original question (except for the LinkId
in the supplied URL) even though the product is SSMS rather than VS:
Version: SQL Server 2016 CTP3
Operating System: Windows 10
Steps to Reproduce:
Right-click SQL Server Management Studio, select "More", then "Run as a different user"
Actual Results:
Error message: "This task requires the application to have elevated permissions" with two options: Restart under different credentials, and Cancel the task and return to Microsoft SQL Server Management Studio. Pressing either option closes the window with no further result. Error information is:
Microsoft SQL Server Management Studio has detected a configuration issue. To correct this, please restart as Administrator. For more information please visit: http://go.microsoft.com/fwlink/?LinkId=647011.
When I go to that page and try the fix suggested there, I can't find ieproxy.dll. The fix is for Windows 7 / Internet Explorer 8, and I'm on Windows 10 with Internet Explorer 11, so that may be why it's not there.
[...]
Posted by Microsoft on 4/28/2017 at 6:26 PM
Hi Jake, It turned out that this issue has been resolved (on the Windows side) very recently - like 3 days ago :)
If you are running Win10 "1703", just make sure you get the latest updates (specifically, KB4016240) and you should be able to run ssms.exe using "runas" just fine. This will work with any version of SSMS.
Currently, the fix is not available on older versions of Win10 (e.g. 1607) or WS2016 (also 1607).
Thanks, -Matteo
[...]
Posted by Microsoft on 4/27/2017 at 7:35 PM
Hi Jake, Yes, we are aware of this issue (in Windows 10).
We've engaged with the Visual Studio and Windows folks (which is there the issue is) and hopefully will have a way to fix this issue in SSMS (you should not need an updated SSMS, just an update in Windows 10).
I'm going to keep this issue open until I have more concrete updates on it.
Thanks, -Matteo
If the Windows updates do not solve the problem or are not available to you, I would suggest trying repair operations on Windows as well as Visual Studio.
I'm running into the same error after updating my Windows 10 to 1607, in that I cannot run Visual Studio as a different user. I'm not building solutions at the time though, but still running the VS program as I think you would be calling.
Using this command: runas /netonly /user:domain \ account devenv.exe
as outlined here Unable to launch Visual Studio 2015 as a different user works for me. Not as convenient but does the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With