Closed AWMKarlas closed 4 years ago
It couldn't find visual studio on your system it looks like.
On Sun, Mar 22, 2020, 08:13 AWMKarlas notifications@github.com wrote:
Good day,
i have a problem with that component. Could you please check the error. I use Azure DevOps 2019, agent 2.153.1. Thanks. `##[debug]Evaluating condition for step: 'CheckIn AssymblyInfo with new version'
[debug]Evaluating: succeeded()
[debug]Evaluating succeeded:
[debug]=> True
[debug]Result: True
[section]Starting: CheckIn AssymblyInfo with new version Task : TFVC -
Check-in changes Description : Checks in any files changed in the repository. Version : 2.2.10 Author : Jesse Houwing Help : More Information https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/wiki/Check-in
[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
[debug]Entering script TfvcCheckin.v3.ps1
[debug]INPUT_COMMENT: '[version][broker]'
[debug]INPUT_INCLUDENOCICOMMENT: 'true'
[debug] Converted to bool: True
[debug]INPUT_ITEMSPEC:
'$/OLB_Scrum/Shared/BrokerWorkplace/AssemblyInfo.cs'
[debug]INPUT_RECURSION: 'None'
[debug]INPUT_CONFIRMUNDERSTAND: 'true'
[debug] Converted to bool: True
[debug]INPUT_OVERRIDEPOLICY: 'false'
[debug] Converted to bool: False
[debug]INPUT_OVERRIDEPOLICYREASON (empty)
[debug] Defaulted to: ''
[debug]INPUT_NOTES (empty)
[debug] Defaulted to: ''
[debug]INPUT_SKIPGATED: 'true'
[debug] Converted to bool: True
[debug]INPUT_SKIPSHELVESET: 'true'
[debug] Converted to bool: True
[debug]INPUT_AUTODETECTADDS: 'false'
[debug] Converted to bool: False
[debug]INPUT_AUTODETECTDELETES: 'false'
[debug] Converted to bool: False
[debug]INPUT_BYPASSGATEDCHECKIN: 'false'
[debug] Converted to bool: False
[debug]INPUT_AUTHOR: 'Custom'
[debug]INPUT_AUTHORCUSTOM: 'aparamonov@gcgroup'
[debug]Loading module from path
'C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1'.
[debug]Loading module from path
'C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\TlsHelper\TlsHelper.psm1'.
[debug]Loading resource strings from:
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\TlsHelper/module.json
[debug]Loaded 3 strings.
[debug]SYSTEM_CULTURE: 'en-US'
[debug]Loading resource strings from:
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\TlsHelper\Strings\resources.resjson\en-US\resources.resjson
[debug]Loaded 3 strings.
[debug]Exporting function 'Add-Tls12InSession'.
[debug]Exporting function 'Assert-TlsError'.
[debug]Importing function 'Add-Tls12InSession'.
[debug]Importing function 'Assert-TlsError'.
Added TLS 1.2 in session.
[debug]Setting default assembly locations
[debug]Trying: C:\TfsAgent\Agent\Worker\Newtonsoft.Json.dll
[debug]Trying: C:\TfsAgent\externals\vstsom\Newtonsoft.Json.dll
[debug]Loading assembly: C:\TfsAgent\externals\vstsom\Newtonsoft.Json.dll
[debug]Setting default assembly locations
[debug]Trying:
C:\TfsAgent\Agent\Worker\Microsoft.TeamFoundation.Client.dll
[debug]Trying:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Client.dll
[debug]Loading assembly:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Client.dll
[debug]Setting default assembly locations
[debug]Trying:
C:\TfsAgent\Agent\Worker\Microsoft.TeamFoundation.Common.dll
[debug]Trying:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Common.dll
[debug]Loading assembly:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Common.dll
[debug]Setting default assembly locations
[debug]Trying:
C:\TfsAgent\Agent\Worker\Microsoft.TeamFoundation.VersionControl.Client.dll
[debug]Trying:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.VersionControl.Client.dll
[debug]Loading assembly:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.VersionControl.Client.dll
[debug]Setting default assembly locations
[debug]Trying:
C:\TfsAgent\Agent\Worker\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
[debug]Trying:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
[debug]Loading assembly:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
[debug]Setting default assembly locations
[debug]Trying: C:\TfsAgent\Agent\Worker\Microsoft.TeamFoundation.Diff.dll
[debug]Trying:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Diff.dll
[debug]Loading assembly:
C:\TfsAgent\externals\vstsom\Microsoft.TeamFoundation.Diff.dll
[debug]Exporting function 'Write-Message'.
[debug]Exporting function 'Invoke-DisposeSourceProvider'.
[debug]Exporting function 'Get-SourceProvider'.
[debug]Exporting function 'AutoPend-WorkspaceChanges'.
[debug]Exporting function 'Convert-ToItemSpecs'.
[debug]Exporting function 'Find-VisualStudio'.
[debug]The 'AutoPend-WorkspaceChanges' command in the VstsTfvcShared'
module was imported, but because its name does not include an approved verb, it might be difficult to find. For a list of approved verbs, type Get-Verb.
[debug]Importing function 'AutoPend-WorkspaceChanges'.
[debug]Importing function 'Convert-ToItemSpecs'.
[debug]Importing function 'Find-VisualStudio'.
[debug]Importing function 'Get-SourceProvider'.
[debug]Importing function 'Invoke-DisposeSourceProvider'.
[debug]Importing function 'Write-Message'.
[debug]Importing modules
[debug]Entering script TfvcCheckin.v3.ps1
[debug]Entering Get-SourceProvider
[debug]SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: '
http://localhost:8080/tfs/VTB24/'
[debug]Entering Get-VstsTfsClientCredentials.
[debug] OMDirectory: ''
[debug]ENDPOINT_URL_SystemVssConnection: '
http://localhost:8080/tfs/VTB24/'
[debug]ENDPOINT_AUTH_SystemVssConnection: '****'
[debug]ENDPOINT_DATA_SystemVssConnection (empty)
[debug]Testing file path: 'Newtonsoft.Json.dll'
[debug]Not found. Rethrowing exception.
[debug]Leaving Get-VstsTfsClientCredentials.
[debug]Entering Invoke-DisposeSourceProvider
[debug]Leaving Invoke-DisposeSourceProvider
[debug]Leaving Get-SourceProvider
[debug]Entering Invoke-DisposeSourceProvider
[debug]Leaving Invoke-DisposeSourceProvider
[debug]Caught exception from task script.
[debug]Error record:
[debug]Get-VstsTfsClientCredentials : ScriptHalted
[debug]At
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1:99 char:29
[debug]+ ... edentials = Get-VstsTfsClientCredentials -OMDirectory
$(Find-VisualSt ...
[debug]+
~~~~~~~~~~~~~[debug] + CategoryInfo : NotSpecified: (:) [Write-Error],
WriteErrorExcep tion
[debug] + FullyQualifiedErrorId :
Microsoft.PowerShell.Commands.WriteErrorExceptio n,Get-VstsTfsClientCredentials
[debug]
[debug]Script stack trace:
[debug]at Get-TfsClientCredentials,
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTaskSdk\ServerOMFunctions.ps1: line 177
[debug]at Get-TfsTeamProjectCollection,
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1: line 99
[debug]at Get-SourceProvider,
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1: line 122
[debug]at ,
C:\TfsAgent_work_tasks\tf-vc-checkin_31f040e5-e040-4556-878a-59a47c7128bd\2.2.10\TfvcCheckin.v3.ps1: line 179
[debug]at , : line 1
[debug]at , : line 22
[debug]at , : line 18
[debug]at , : line 1
[debug]Exception:
[debug]Microsoft.PowerShell.Commands.WriteErrorException: ScriptHalted
[error]ScriptHalted
[debug]Processed: ##vso[task.logissue type=error]ScriptHalted
[debug]Processed: ##vso[task.complete result=Failed]
[section]Finishing: CheckIn AssymblyInfo with new version`
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/issues/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA724S6J5XN7RIBPNBMOWWDRIW3BJANCNFSM4LRGE4PA .
I have server with deployed Azure Server 2019 and agent and also VS 2017. Is it necessary to have VS installed on agent machine?
It's not finding vs2017. Did you install the Team Explorer workload in vs2017
On Sun, Mar 22, 2020, 11:43 AWMKarlas notifications@github.com wrote:
I have server with deployed Azure Server 2019 and agent and also VS 2017
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/issues/99#issuecomment-602178956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA724SYV23WTGZRK2MSSNX3RIXTUXANCNFSM4LRGE4PA .
This is the command that runs to find Visual Studio:
vswhere.exe -latest -products * -requires Microsoft.VisualStudio.TeamExplorer -property installationPath
On Sun, Mar 22, 2020, 12:43 Jesse Houwing jesse.houwing@gmail.com wrote:
It's not finding vs2017. Did you install the Team Explorer workload in vs2017
On Sun, Mar 22, 2020, 11:43 AWMKarlas notifications@github.com wrote:
I have server with deployed Azure Server 2019 and agent and also VS 2017
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/issues/99#issuecomment-602178956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA724SYV23WTGZRK2MSSNX3RIXTUXANCNFSM4LRGE4PA .
I had a similar issue and following up on your feedback I added a literal path to the visual studio 14 and it worked. I did some additional testing and confirmed that vswhere.exe returns an empty string even when run at the command line. Can you tell me why "$PSScript/vswhere.exe" does not appear to work?
This was my work-around: function Find-VisualStudio { $ErrorActionPreference = 'Stop'
$path = & $PSScriptRoot/vswhere.exe -latest -products * -requires Microsoft.VisualStudio.TeamExplorer -property installationPath
#Added a literal path since I know exactly where VS 14.0 is located.
if ([string]::IsNullOrWhiteSpace($path))
{
#vswhere returns null. so use literal path to VS 14
$path = 'C:\Program Files (x86)\Microsoft Visual Studio 14.0'
}
if ( -not [string]::IsNullOrWhiteSpace($path)) {
$path = join-path $path '\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\'
return $path
}
return $null
}
Visual Studio 14.*, That's 2015 from the top of my head. it used a different installer technique. vswhere
supports 2017 and above.
vs 16 => 2019
vs 15 => 2017
vs 14 => *2015*
I can add a registry lookup to find the correct installation path, though I'd recommend a newer version of Team Explorer.
Then that makes sense. I thought that version 2 of the script supported VS2015. Does this mean that I'll need to upgrade to VS2017 or greater?
It should try to look up 2015 too... https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/blob/master/tf-vc-shared/v2/ps_modules/VstsTfvcShared/VstsTfvcShared.psm1
I may have a possible solution. If you send me your org name, I can share a test version. The hosted pool no longer ahs images with just VS2015 n it, so I can't test it easily anymore. @kdrayton
I think I found the cause op the bug. The path to the assemblies is mostly handled by my own code. That used to be in one place. The auth code needs a pointer to the Visual Studio installation as well. There I only pass in the Find-VisualStudio
function, which won't resolve VS2015.
I moved all the find logic into Find-Visualstudio
.
@kdrayton @AWMKarlas can either of you confirm the fix? It has been deployed in 2.2.15.
Hi Jesse,
I tested your latest changes to the VstsTfvcShared.psm1 module and the Find-Visualstudio function. It worked well with no errors. Thank you for jumping on this and getting it resolved so quickly.
FINALLY! Thanks for confirming. Closing.
If the extension helps you, it would help me if you could do any or all of the following:
Good day,
i have a problem with that component. Could you please check the error. I use Azure DevOps 2019, agent 2.153.1. Thanks.