I just got a json file which was exported from a TFS (On Premises). Now i want to import it in VSTS, but i got the following error. enter image description here
It says Cannot read property 'length' of undefined
I also tried it using a extension. It is importing the file successfully and making variables but not making tasks.
Link of extension: Import/Export Build definition
Generally export/import build definition works on the same version/level of TFS as they have the same properties.
In your scenario you are trying to import the build definition cross versions (On Premises and VSTS here). Since there are some differences between the On Premises TFS
and VSTS
, For example some tasks are only existing in VSTS, and some tasks are different...
So you cannot simply import the json file. Suggest you creating an equivalent build definition manually in VSTS. Then export and import to other team projects from VSTS.