The "InstallPackageAssemblies" task failed unexpectedly in Xamarin - visual-studio

I can't run/deploy my Xamarin Android app using Visual Studio 2015. Unfortunately after copied The "InstallPackageAssemblies" task failed unexpectedly error comes. What should I do?
100% ... 41369kb of 41369kb copied
2>The "InstallPackageAssemblies" task failed unexpectedly.
2>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Unexpected install output: pkg: /data/local/tmp/Mono.Android.DebugRuntime-debug.apk
2>
2> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2> at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyF.<>m__0(Task`1 t)
2> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> at System.Threading.Tasks.Task.Execute()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()
2> --- End of inner exception stack trace ---
2> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2> at System.Threading.Tasks.Task.Wait()
2> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
2> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Unexpected install output: pkg: /data/local/tmp/Mono.Android.DebugRuntime-debug.apk
2>
2> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2> at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyF.<>m__0(Task`1 t)
2> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> at System.Threading.Tasks.Task.Execute()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()<---
2>
2>Done executing task "InstallPackageAssemblies" -- FAILED.
2>Done building target "_Upload" in project "MyFirstApp.csproj" -- FAILED.
2>Done building project "MyFirstApp.csproj" -- FAILED.
2>Build FAILED.

Go to Settings->Manage Apps. Find your application and do Uninstall. Then find all apps starting with "Xamarin.Android API -xx Support" and uninstall them. Uninstall app "Mono Shared Runtime". Try to deploy your app again.
As Kirill Shlenskiy said make sure you find your app. It can be under App name or just named as your app package name

I was able to fix this. I changed to a different emulator and the error went away. Now my release version will deploy, but it crashes immediately. Old bug fixed and new one to fix!

Related

Could not load file or assembly 'Microsoft.Windows.Simulator.Client, 'Microsoft.VisualStudio.CppSvc.Internal StreamJsonRpc.RemoteInvocationException

My OS is Windows 10, developing with Visual Studio 2019, XCode 9.4, and developing Xamarin Forms app.
When trying to connect Mac book Pro 13 (10.13.6), via Visual Studio 2019, I get this weird state where I am connected to MacBook (check the 'chain' under screen icon), but really I am not, as it does not appear in paired devices.
When running the app I get a single error that says A remote error occurred in the connected Mac
When I click on the message I get to a log and in it I see a lot of steps and four errors.
8 PkgDefManagement initialized VisualStudio 2021/03/03 14:54:24.665
9 RootFolder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\ VisualStudio 2021/03/03 >14:54:24.665
10 ShellFolder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\
624 ERROR Still unable to load MEF component DLL: Could not load file
or assembly 'Microsoft.Windows.Simulator.Client, Version=16.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\platform\diagnosticshub\Microsoft.DiagnosticsHub.VisualStudio.Package.dll
Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost
2021/03/03 14:54:41.666
625 ERROR Still unable to load MEF component DLL: Could not load file
or assembly 'Microsoft.VisualStudio.CppSvc.Internal, Version=16.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis\Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll
Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost
2021/03/03 14:54:41.673
781 ERROR StreamJsonRpc.RemoteInvocationException: Error enumerating
over credential store.at
StreamJsonRpc.JsonRpc.d__1391.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 Microsoft.Developer.IdentityService.PipeManager.<InvokeRpcFuncAsync>d__131.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
Microsoft.Developer.IdentityService.AccountProvider.GithubAccountProviderClient.d__40.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
Microsoft.Developer.IdentityService.AccountProvider.GithubAccountProviderClient.d__44.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
Microsoft.VisualStudio.Shell.Connected.UserInformation.UserInformationPackage.d__11.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
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0.<b__0>d.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
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass35_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception
exceptionObject) RPC server exception:
Microsoft.Developer.IdentityService.GithubCredentialStorage.Interop.InteropException:
Error enumerating over credential store.at
Microsoft.Developer.IdentityService.GithubCredentialStorage.Interop.Windows.WindowsCredentialStore.Enumerate(String
filter)at
Microsoft.Developer.IdentityService.GithubCredentialStorage.GitHubCredentialStore.SearchAllCredentials()at
Microsoft.Developer.IdentityService.GithubCredentialStorage.GithubCredentialStoreService.b__10_0()at
System.Threading.Tasks.Task`1.InnerInvoke()at
System.Threading.Tasks.Task.Execute() vs/identity/githubsso
2021/03/03 14:55:12.650
....
and then at the very bottom
914 Did not find item to promote MruList 2021/03/03 15:26:46.494
915 Entering MruItemsStoreServiceDecorator.AddMRUItem. Item category:
335041a8-b61a-4e9f-b0fe-d42dfa193855, lpszItem:
%UserProfile%\source\repos\StruebyPhotoApp\StruebyPhotoApp.Api\StruebyPhotoApp.Api.csproj|{00000000-0000-0000-0000-000000000000}|0,0|False
CodeContainerTracing 2021/03/03 15:26:46.494
916 ERROR
System.NullReferenceException: Object reference not set to an instance
of an object.at
Xamarin.Messaging.Windows.ErrorsManager.<>c__DisplayClass3_0.b__0(IErrorItem
item) in
C:\A\1\36\s\src\Core\Xamarin.Messaging.Windows\ErrorsManager.cs:line
24at Clide.ErrorsManager.<>c__DisplayClass7_0.b__0(Object sender,
EventArgs e) in
E:\A_work\349\s\src\Clide.Core.Windows\Errors\ErrorsManager.cs:line
55at Microsoft.VisualStudio.Shell.Task.OnNavigate(EventArgs e)at
Microsoft.VisualStudio.Shell.Task.Microsoft.VisualStudio.Shell.Interop.IVsTaskItem.NavigateTo()at
Microsoft.VisualStudio.ErrorListPkg.Shims.ErrorListPackageEventProcessor.PreprocessNavigate(ITableEntryHandle
entryHandle, TableEntryNavigateEventArgs e)at
Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass40_0.b__2(ITableControlEventProcessor
p, ITableEntryHandle entry)at
Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass60_1`1.b__0()at
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object
errorSource, Action call) --- End of stack trace from previous
location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception
exceptionObject)
and this is where it ends.
What is going on? How do I debug this further?
The answer was to get a Mac Book Air that had support for the latest macOS (High Spur) and latest XCode (12) and the Visual Studio and Mac book managed to connect.
So one potential solution would be to upgrade your hardware.

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

Cannot load Q# language extension

I installed the quantum development kit from the microsoft site:
https://www.microsoft.com/en-us/quantum/development-kit
But when I try to open one of the projects or create a Q# I get the message:
There was an error activating the remote language server, Q# Language Extension. For more details, please run devenv /log and examine ....\ActivityLog.xml file.
I ran it and found:
ERROR
System.SystemException: The trust relationship between the primary domain and the trusted domain failed. at System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) at System.Security.Principal.NTAccount.Translate(Type targetType) at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified) at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule) at System.IO.Pipes.PipeSecurity.AddAccessRule(PipeAccessRule rule) at Microsoft.Quantum.QsLanguageExtensionVS.QsLanguageClient.d__24.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.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__49.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 Microsoft.VisualStudio.Threading.ThreadingTools.d__12.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 Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__47.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Q# Language Extension
So I have no intellisense and the *.qs files are not as Q# recognized.
Visual Studio 2017 15.9
Windows 10 1809
Any idea about this?
We have posted a new version of the Visual Studio extension (0.3.1811.1501) which we believe should fix the problem. Do you mind updating the extension and giving it a try?

VisualStudio Online TestAgent behind proxy

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
******************************************************************************

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.

Resources