VisualStudio Online TestAgent behind proxy - visual-studio
summary:
I'm having difficulties getting the test agent to deploy as part of the build process in Visual Studio Online for a website, maybe due to network proxy.
details:
I work for Crab Company, "cc" for short (no, not really), and we have an account at https://cc.visualstudio.com .
We have an on-premise build server, "ccvsts", Windows Server 2012 R2.
We have an instance that will be used for intranet testing and will be hosting the website, "ccwebt1", Windows Server 2016.
Network traffic is filtered. Ports were opened. Intranet machines connect to the internet using a proxy.
We have some tests for the website utilizing Selenium. I'm trying to incorporate this testing following the guide at https://www.visualstudio.com/en-us/docs/test/continuous-testing/getting-started/continuous-test-selenium but instead of building the solution (which has a bunch of projects) I've got it building just the website project and test project:
I've gotten to the point where the project builds, and past some initial networking issues, but I think now I'm running into a problem due to the proxy. I think the relevant exception is
System.Management.Automation.MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 104.214.111.103:443
Note that cc.visualstudio.com resolves to 104.214.111.103
Also note, this is failing on the "Deploy TestAgent on" build step.
Also also note, the first build steps do succeed and code is generated on ccvsts, so the build agent (at least) can already communicate with Visual Studio Online.
I believe this is proxy related by example of the following powershell
PS > $R = Invoke-WebRequest -URI http://www.bing.com?q=how+many+feet+in+a+mile
Invoke-WebRequest :
Access Denied (authentication_failed)
Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your
credentials can be verified.
However, this might be a credential issue. The requirements for the test agent were a bit unclear to me, so I have set up a local user account and local admin account on ccwebt1, but neither account has access to VSTS. I don't know if this will cause problems or not.
To summarize my question
1) If the network proxy is preventing access to visual studio online in the test agent power shell script, how can I fix that?
2) Will using local accounts for the test agent prevent access to visual studio online?
Log below (with a few values renamed, but otherwise unmodified)
******************************************************************************
Starting: Deploy TestAgent on
******************************************************************************
==============================================================================
Task : Visual Studio Test Agent Deployment
Description : Deploy and configure Test Agent to run tests on a set of machines
Version : 2.1.20
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=838890)
==============================================================================
****************************************************************
Task Input Information
----------------------------------------------------------------
testMachineInput = ccwebt1
adminUserName = ccwebt1\ccwebt1localadmin
winRmProtocal = Http
testCertificate = true
machineUserName = ccwebt1\ccwebt1local
runAsProcess = false
logonAutomatically = false
disableScreenSaver = false
isDataCollectionOnly = false
testPlatform = 14.0
agentLocation =
updateTestAgent = false
****************************************************************
Starting to deploy and configure test agent on test machines.
Inputs provided are:
Use HTTP Port: True
Username: ccwebt1\ccwebt1local
Disable Screen saver: False
Login Automatically: False
Run as process: False
Agent would be downloaded from https://go.microsoft.com/fwlink/?LinkId=615472
Update test agent: False
Run test agent as DataCollection only : False
Task 'VerifyTestAgentInstalled' on machine 'ccwebt1:5985' is being run
Deployment started on target machine...
Query for Testplatfrom version: 14.0
Test Agent does not exists
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:37:45:2421; 4784, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:37:45:2576; 4784, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer553ef14b-0634-460a-b535-cb40cbcb2409 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Finished reading input parameters
Task 'VerifyTestAgentInstalled' on machine 'ccwebt1:5985' completed.
Starting to download testagent
Test agent download is taking time. Please wait.
testagent is downloaded at: C:\TestAgent\365dea8f-557e-45e8-bb1d-fa59563f01ef
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' is being run
\\ccwebt1 was deleted successfully.
Copying recursively from C:\TestAgent\365dea8f-557e-45e8-bb1d-fa59563f01ef to C:\TestAgent on machine ccwebt1 succeeded.
\\ccwebt1 was deleted successfully.
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' completed.
Task 'InstallTestAgent' on machine 'ccwebt1:5985' is being run
Task 'InstallTestAgent' on machine 'ccwebt1:5985' is taking time. Please Wait
Task 'InstallTestAgent' on machine 'ccwebt1:5985' completed.
Deployment started on target machine...
Setup path: C:\TestAgent\vstf_testagent.exe
Installed Test Agent version: 0.0
Requested Test Agent version: 14.0.25463
Test Agent will be installed
Invoking the command C:\TestAgent\vstf_testagent.exe with arguments
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:39:18:4378; 420, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:39:18:4534; 420, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer3c6e52bc-5767-4bfd-9dba-f056c5d90671 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:39:19:4789; 420, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:39:19:4789; 420, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:39:19:4945; 420, 6](ccwebt1)Finished reading input parameters
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' is being run
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' completed.
\\ccwebt1 was deleted successfully.
Copying recursively from C:\agent\_work\_tasks\DeployVisualStudioTestAgent_52a38a6a-1517-41d7-96cc-73ee0c60d2b6\2.1.20\TestExecution.zip to C:\TestAgent on machine ccwebt1 succeeded.
\\ccwebt1 was deleted successfully.
Task 'TestAgentConfiguration' on machine 'ccwebt1:5985' is being run
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:40:28:2919; 3220, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:40:28:2919; 3220, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer1b3bbb26-a295-47a6-93bb-1432b9140099 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Finished reading input parameters
Task 'TestAgentConfiguration' on machine 'ccwebt1:5985' completed.
Task 'TestAgentConfiguration' for machine ccwebt1:5985's Error : System.Exception: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
Task 'TestAgentConfiguration' for machine ccwebt1:5985's Log :
Deployment started on target machine...
System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server ---> System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.ScriptExecutor.ExecuteScript(IPowerShell powerShell, String script, String arguments, Boolean isScriptDotSourced, Boolean useHttp)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.DeploymentService.RunPowerShellScripts(DeploymentMachineSpecification deploymentMachine, ScriptSpecification scriptSpecification, ScriptSpecification initializationScriptSpecification, String applicationPath, IPowerShell powerShellSession)
---> (Inner Exception #0) System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)<---
Test User ccwebt1local
Test UserDomain ccwebt1
Path: C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll
Loading module from path 'C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\System.Net.Http.Formatting.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Common.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Test.WebApi.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.Common.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.WebApi.dll'.
Loading module from path 'C:\TestAgent\PrivateAssemblies\MS.VS.TestService.Client.Utility.dll'.
****************************************************************
Configure Test Agent
----------------------------------------------------------------
SetupPath : (C:\TestAgent)
TestUserName : (ccwebt1\ccwebt1local)
TfsCollection : (https://cc.visualstudio.com/)
AsServiceOrProcess : (Service)
EnvironmentUrl : (dta://env/2d109582-6dad-402e-8297-aa8de2398194/_apis//201709121137404659)
MachineName : (ccwebt1)
Capabilities : ()
TestAgentVersion : (14.0)
****************************************************************
Unable to connect to Team Foundation Server, Check if TFS is reachable from the test agent. Exception Details :
System.Management.Automation.MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 104.214.111.103:443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpRetryMessageHandler.cs:line 159
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 818
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 721
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\HttpClients\LocationHttpClient.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 692
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<EnsureConnectedAsync>d__39.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 642
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<GetInstanceIdAsync>d__11.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 174
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.LocationService.<GetLocationDataAsync>d__2.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\LocationService.cs:line 54
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientInstanceAsync>d__18.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 357
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientServiceImplAsync>d__15.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 299
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientAsync>d__12`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 227
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.TaskExtensions.SyncResult[T](Task`1 task) in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\TaskExtensions.cs:line 35
at Microsoft.VisualStudio.Services.WebApi.VssConnection.GetClient[T]() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 195
at MS.VS.TestService.Client.Utility.TestExecutionServiceRestApiHelper.Initialize(String serviceUrl, String accesToken) in E:\v2.0\A5\_work\1\s\Ta\Agent\VS.TestService.Client.Utility\RestApiHelper.cs:line 108
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at MS.VS.TestService.Client.Utility.TestExecutionServiceRestApiHelper.RunTaskWithRetriesOnServiceUnavailability[T](Func`1 getTask) in E:\v2.0\A5\_work\1\s\Ta\Agent\VS.TestService.Client.Utility\RestApiHelper.cs:line 158
--- End of inner exception stack trace ---
at System.Management.Automation.DotNetAdapter.AuxiliaryConstructorInvoke(MethodInformation methodInformation, Object[] arguments, Object[] originalArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[] constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[] constructors, Object[] args)
Error occurred on 'ccwebt1:5985'. Details : 'The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server'. For troubleshooting, refer https://aka.ms/remotevstest.
******************************************************************************
Finishing: Deploy TestAgent on
******************************************************************************
Related
Docker install failed on Windows 10
I am trying to install docker on windows 10. I therefore downloaded the installer as per the official documentation, but when I execute it I get the following error: Docker.Core.HttpBadResponseException: {"message":"1 error occurred:\n\t* starting WSL integration service: synchronising agents: starting added distros: 1 error occurred:\n\t* waiting for WSL integration for Ubuntu: timed out while polling for WSL distro integration to become ready in "Ubuntu"\n\n\n\n"} at Docker.Core.GoBackend.GoBackendClient.d__19.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 226 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.LinuxWSL2Engine.d__11.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 54 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 91 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 118 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.EngineStateMachine.d__15.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.Engines.d__23.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 109 I tried installing multiple times, with and without admin privileges.
For Windows OS, your need to install Windows Subsystem for Linux WSL. Here is a link to install it : https://learn.microsoft.com/en-us/windows/wsl/install
Visual Studio 2017 instance is not opened
Can anyone have any idea why Visual studio instance is not getting opened and how can I fix that. Below is error details I found from Visual Studio logs & system. Visual Studio 2017 (15.9.22) .Net Framework : 4.7 OS Windows Server 2016 MSVCP120_CLR0400.dll is either not designed to run on Windows C:\Windows\system32\MSVCP120_CLR0400.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000012f. The type initializer for '' threw an exception. LegacySitePackage failed for package [Environment Package Window Management]Source: 'Microsoft.VisualStudio.Shell.15.0' Description: The type initializer for '' threw an exception. System.TypeInitializationException: The type initializer for '' threw an exception. ---> .ModuleLoadException: The C++ module failed to load during appdomain initialization. ---> System.DllNotFoundException: C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll ---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath, UInt16* baseDllPath) at MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc) at ?A0x4260310d.CreateCModuleInitialize() at ?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport* ) at .LanguageSupport._Initialize(LanguageSupport* ) at .LanguageSupport.Initialize(LanguageSupport* ) --- End of inner exception stack trace --- at .LanguageSupport.Initialize(LanguageSupport* ) at .cctor() --- End of inner exception stack trace --- at Microsoft.VisualStudio.Shell.ThreadHelper.get_DispatcherForUIThread() at Microsoft.VisualStudio.Shell.ThreadHelper.CheckAccess() at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType) at Microsoft.VisualStudio.Shell.Package.Initialize() at Microsoft.VisualStudio.Shell.AsyncPackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp).ModuleLoadException: The C++ module failed to load during appdomain initialization. ---> System.DllNotFoundException: C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll ---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath, UInt16* baseDllPath) at MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc) at ?A0x4260310d.CreateCModuleInitialize() at ?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport* ) at .LanguageSupport._Initialize(LanguageSupport* ) at .LanguageSupport.Initialize(LanguageSupport* ) --- End of inner exception stack trace --- at .LanguageSupport.Initialize(LanguageSupport* ) at .cctor()System.DllNotFoundException: C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll ---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath, UInt16* baseDllPath) at MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc) at ?A0x4260310d.CreateCModuleInitialize() at ?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport* ) at .LanguageSupport._Initialize(LanguageSupport* ) at .LanguageSupport.Initialize(LanguageSupport* )System.ComponentModel.Win32Exception (0x80004005): %1 is not a valid Win32 application
Visual studio 2019 fails to create rsync config when setting up remote connection
So I an trying to add a remote connection to my Ubuntu 18.04 server for remote debugging in VS. Both when I add the connection and if I try to refresh remote headers I get the following error: Checking the log I get the following more informative error: liblinux.IO.RsyncException: Could not create daemon configuration file on remote device How do I solve this exactly? Is there some way for me to set up this file manually if I can't get it to work automatically? Here is the full error in the log if needed: liblinux.IO.RsyncException: Could not start the 'rsync' command on the remote host, please install it using your system package manager. Please see https://aka.ms/AA23jat for troubleshooting. ---> liblinux.IO.RsyncException: Could not create daemon configuration file on remote device ---> System.ObjectDisposedException: Cannot access a disposed object. Object name: 'ShellStream'. at liblinux.Ssh.ShellStream.Write(String text) at liblinux.Ssh.ShellStream.WriteLine(String line) at liblinux.Shell.StreamingShell.WriteLine(String line) at liblinux.IO.RemoteRsyncDaemon.Start() --- End of inner exception stack trace --- at liblinux.IO.RemoteRsyncDaemon.Start() at liblinux.IO.Rsync.StartRemoteServer(RemoteRsyncDaemon daemon) --- End of inner exception stack trace --- at liblinux.IO.Rsync.StartRemoteServer(RemoteRsyncDaemon daemon) at liblinux.IO.Rsync.PrepareForDirectorySync(Int32 sessionID, String localPath, String remotePath, RsyncDirection direction, RemoteRsyncDaemon daemon, RsyncVerbosity verbosity, Boolean recursive, List`1 includes, List`1 excludes, Boolean& sourcePathExists, String customOptions) at liblinux.IO.Rsync.<SyncDirectoryAsync>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at liblinux.Services.RsyncRemoteCompilerIOImpl.<DownloadDirectoriesAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at liblinux.Services.RemoteCompiler.<DownloadSysrootAsync>d__152.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at liblinux.Services.RemoteCompiler.<CreateSysrootAsync>d__186.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at liblinux.Services.RemoteCompiler.<CreateLocalSysrootAsync>d__147.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<DownloadUpdateAsync>d__18.MoveNext()
Unable to connect Visual studio to MAC Mini - Xamarin
I am trying to connect to a MAC Mini to a Windows PC running visual studio but it fails to connect. I have tried everything mentioned in the Xamarin Docs HERE We have successfully connected the same MAC Mini to another PC on the network, but can't seem to get it to connect with another PC (Note: We are not connecting both at the same time) We have checked the SSH and it seems to be fine - we can connect using PUTTY and GIT Bash. Also we are using the correct username of MAC - we retrieved using whoami command. Below is the log file content. Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-10-28 15:58:04.7169] MacServer State transition from DisconnectedState to SshConnectingState on XT-14.local (192.168.0.214) Xamarin.Messaging.Client.Ssh.SshMessagingConnection Error: 0 : [2016-10-28 15:58:15.0329] An unexpected error occurred on with the current SSH Session Renci.SshNet.Common.SshException: Message type 80 is not valid. at Renci.SshNet.Session.LoadMessage(Byte[] data) at Renci.SshNet.Session.ReceiveMessage() at Renci.SshNet.Session.MessageListener() Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-10-28 15:58:18.9447] Starting Broker 4.1.1.3 in port 50843... System.Net.Mqtt.TcpChannel Warning: 0 : [2016-10-28 15:58:26.0069] The TCP Network Stream has completed sending bytes. The observable sequence will be completed and the channel will be disposed Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-10-28 15:58:26.2103] MacServer State transition from SshConnectingState to DisconnectedState on XT-14.local (192.168.0.214) Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Error: 0 : [2016-10-28 15:58:26.3702] An error occurred on the underlying client while executing an operation. Details: The client vs4940Lenov has been disconnected while trying to perform the connection System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-10-28 15:58:26.5290] Client vs4940Lenov - Packet Channel observable sequence has been completed Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Information: 0 : [2016-10-28 15:58:26.6871] Disconnected from Mac XT-14.local (192.168.0.214) Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Error: 0 : [2016-10-28 15:58:26.8482] Couldn't connect to XT-14.local. Please try again. System.Net.Mqtt.Client.Client Error: 0 : [2016-10-28 15:58:27.0164] System.Net.Mqtt.Client.ClientException: The client vs4940Lenov has been disconnected while trying to perform the connection at System.Net.Mqtt.Client.Client.<ConnectAsync>d__29.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext() Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Error: 0 : [2016-10-28 15:58:27.2886] There was an error while trying to connect the client vs4940Lenov to the server. Xamarin.Messaging.Exceptions.MessagingException: There was an error while trying to connect the client vs4940Lenov to the server. ---> System.Net.Mqtt.Client.ClientException: The client vs4940Lenov has been disconnected while trying to perform the connection at System.Net.Mqtt.Client.Client.<ConnectAsync>d__29.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext() --- End of inner exception stack trace --- at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.Messaging.Client.Ssh.SshMessagingConnection.<ConnectAsync>d__37.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Xamarin.Messaging.VisualStudio.MessagingService.<ConnectAsync>d__73.MoveNext() System.Net.Mqtt.TcpChannel Error: 0 : [2016-10-28 15:58:27.7771] An error occurred while closing underlying channel. Error code: 10054 System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Shutdown(SocketShutdown how) at System.Net.Mqtt.TcpChannel.Dispose(Boolean disposing) Update 1 Here is an image
When connecting Visual Studio to the Mac host it's important to ensure that the Xamarin tooling is in sync on both systems and that the version numbers match. In this case it looks like one of the computers was running an outdated version of the Xamarin tooling. Updating this to the latest Stable version fixed the problem. More information can be found in Xamarin's Connecting to the Mac guide, and if problems persist I'd recommend checking out the Troubleshooting guide as this outlines common issues / known problems / workarounds.
Cannot load any MSBuild project in Visual Studio 2013
I've just started learning MSBuild and tried to load the below simple test project to Visual Studio 2013 (Update 5), but I'm getting the error 'The project system has encountered an error' - 'The given key was not present in the dictionary.' Note I can successfully build the project with MSBuild from command line, just want to see it in VS project tree as part of a solution among the other csproj/vcxproj/etc. projects. I've tried several ways, changing bits and pieces in msbuildproj file, etc. - no success, always getting the same error. Any idea what I'm doing wrong? Are MSBuild projects not supposed to be added to VS solution? <!-- mytest.msbuildproj --> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > <Target Name="Build"> <Message Text="Building my target" /> </Target> </Project> The project system has encountered an error VsProjectFault_8c79b7c1-086a-47e9-be8c-46300a431de3.failure.txt: ===================== 01/03/2016 17:10:25 Recoverable System.AggregateException: One or more errors occurred. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at Microsoft.Collections.Immutable.ImmutableDictionary2.get_Item(TKey key) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.GetProjectRootProperties(ConfiguredProjectExports configuredProjectExports) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.GenerateOriginalTree(ConfiguredProjectExports configuredProjectExports, CancellationToken cancellationToken) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.<GenerateOriginalTreeAsync>d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex) at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3() at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0() at GuardMethodClass.GuardMethod(Func1 , Func2 , Func2 ) --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at Microsoft.Collections.Immutable.ImmutableDictionary2.get_Item(TKey key) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.GetProjectRootProperties(ConfiguredProjectExports configuredProjectExports) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.GenerateOriginalTree(ConfiguredProjectExports configuredProjectExports, CancellationToken cancellationToken) at Microsoft.VisualStudio.ProjectSystem.Designers.PhysicalProjectTreeProvider.<GenerateOriginalTreeAsync>d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex) at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3() at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0() at GuardMethodClass.GuardMethod(Func1 , Func2 , Func2 )<--- ===================
Not all msbuild files are created equal. Sure you can craft one from scratch, and run it on the command line. But that doesn't mean visual studio will like that file. Visual studio needs a msbuild file with a certain schema, and the above file doesn't fit the bill.