onlyutkarsh / ExportImportBuildDefinition

Export and Import your build definitions. Useful for recreating all the build steps, variables, schedules, etc in a different team project/account.
http://bit.ly/exportimportbuild
Other
17 stars 8 forks source link

TFS.WebApi.Exception: Invalid or missing service connection #3

Closed srivatsamarichi closed 8 years ago

srivatsamarichi commented 8 years ago

Installed product versions

I am trying to import an existing build definition template (which is a json file) to one of my VSTS account and i am facing the above mentioned Exception

new 2.txt

onlyutkarsh commented 8 years ago

Hi Srivatsa, Thanks for letting me know. Unfortunately, I am getting a completely different error (repository.id is null) while importing your json. Can you please let me know if this is correct JSON? Regarding the error, can you let me know,

I will try to create the definition based on your response and try to replicate the issue.

srivatsamarichi commented 8 years ago

Hi Utkarsh, Sorry for the delay in response as i was on business travel. Please find the inline replies for the same-

  1. No the definition isn't getting created post the error.2. I am directly importing it to a new TP on VSTS. So i don't have any existing definitions over there. As mentioned in your document, i just created a sample empty definition before importing it.3. Properties like i am having my build workflow as follows-    a. nuget restore     b.Version assemblies     c.VS Build etc
  2. No it's not working for the template which i am using. But i tried exporting the definition from the other VSTS account of mine and re-imported the same, it was working fine. In the JSON that i have shared you, i used to get the same (repository.id null) error. I just did a minute change in the JSON file-- @the bottom of the JSON you can see i have parameters for my repository. I changed the "TFSGit" to "Git" and then i encountered that TFS.WebApiExtension error. P.S-The template which i am trying to import is successfully imported upon running the PowerShell script. I found that in the below mentioned link on GitHub.  https://github.com/Azure-Samples/MyDriving/tree/master/scripts

When i run the Powershell script, it will ask the parameters like vsts account,PAT,build definition path, local working folder.So this powershell will automatically download the source code for my local repo and will upload the existing JSON files that i'm mapping to. I thought of doing it through the extension which was available in the VS Marketplace which would serve my purpose but i was failed miserably.  Let me know if you need anything else :-) BTW, great extension though! Thanks,Srivatsa

On Tuesday, 19 July 2016 2:13 AM, Utkarsh Shigihalli <notifications@github.com> wrote:

Hi Srivatsa, Thanks for letting me know. Unfortunately, I am getting a completely different error (repository.id is null) while importing your json. Can you please let me know if this is correct JSON? Regarding the error, can you let me know,

onlyutkarsh commented 8 years ago

@SrivatsaMarichi Sorry for coming back late on this one. Been very busy with work and there were few technical challenges for export/import b/w cross version control (for ex: git <=> tfvc). I have a question, in your sample file attached above, I see a task named Version Assemblies using AssemblyInfo.*. Is this a custom task? Installed via extension? If yes, can you please provide me extension URL?

onlyutkarsh commented 8 years ago

@SrivatsaMarichi Please try the latest version and let me know if you still have the same issue.