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.