Completed
Last Updated: 06 Jan 2017 22:15 by B
ADMIN
Boyan Boev
Created on: 21 Mar 2015 12:19
Type: Bug Report
1
When checking a project to TFS System.ArgumentException is thrown
After upgrading to 2015 R1 when checking a test project to TFS an exception is thrown:

 Outer Exception Type: System.ArgumentException
     Message: The array must contain at least one element.
          Parameter name: paths
     HRESULT: 0x80070057 (Official ID (if app.) = E_INVALIDARG, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_INVALID_PARAMETER)
     Call Stack:
          at Microsoft.TeamFoundation.Common.TFCommonUtil.CheckArrayForNullOrEmpty[T](T[] array, String arrayName)
          at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive, String fileType, LockLevel lockLevel, Boolean treatMissingItemsAsFiles, Boolean silent, Boolean applyLocalItemExclusions)
          at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths)
          at ArtOfTest.Common.TFSClient.TFSServer.AddFiles(IRepositoryInfo repository, String[] files)
          at ArtOfTest.WebAii.Design.ProjectModel.Providers.SourceControl.SourceControlProviderBase.AddItems(String[] filePaths)

[03/20 09:50:32,Telerik.TestStudio.exe(5700:1),TeamFoundationServer] TFSServer.CommitRevision() : EXCEPTION! (see below)
     Situation: Exception checking files in to TFS
     Outer Exception Type: System.IO.FileNotFoundException
     Message: Could not find file 'M:\Automation Development\FromDesktop\Visual Studio Projects\NucleusConnect\NucleusConnect\Data\TestingScenariosDataSheet.xlsx'.
     HRESULT: 0x80070002 (Official ID (if app.) = 2147942402, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_FILE_NOT_FOUND)

The workaround is to add the missing file to the corresponding folder.
2 comments
B
Posted on: 06 Jan 2017 22:15
I am getting this error when I try to add to source control a snippet file I created in Madcap Flare, and then linked to from two topic files. (This occurs whether the referencing files are checked out or checked in.) Further, if I try to delete the snippet file (both keeping the reference links intact or deleting them), I get an error saying the file cannot be deleted.
Any thoughts on diagnosing or resolving this problem?
ADMIN
Daniel Djambov
Posted on: 05 May 2016 07:28
Telerik: this is a specific case when the local file is somehow missing or deleted after project is loaded and the exception is properly indicating there is a problem. We have implemented an error handling for such cases, which brings an error dialog explaining the problem and not allowing to check-in until the project is Refreshed or the file(s) are restored physically. The solution will be available in our next product release, planned to be out in May 2016.