Skip to main content
Community site session details

Community site session details

Session Id : MwYn1B9Y61zWZCJJwzRKLh
Power Apps - Power Apps Pro Dev & ISV
Unanswered

PowerPlatform tool installer gives me a nuget error on private build agent

Like (0) ShareShare
ReportReport
Posted on 19 Jun 2020 10:27:09 by 15

When using the PowerPlatform Tool Installer on a private build agent (Windows VM in Azure), it gives me an error

 

 

  • adsdsad Profile Picture
    15 on 25 Jun 2020 at 14:10:48
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    Fixed it by adding the powershell task in the pipeline containing the following script:

     

    Unregister-PackageSource -Source nuget.org

     

  • adsdsad Profile Picture
    15 on 25 Jun 2020 at 11:51:58
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    It seems that the Tool Installer script is writing a nuget.config file to the toolspath dir:

    in my case: \_work\21\_t\PA_BT\nuget.config

     

    However, the only contents of this file is:

    <configuration />

     

    When I fix this file manually, it doesn't help, because it would be overwritten each time. 

  • adsdsad Profile Picture
    15 on 23 Jun 2020 at 09:06:34
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    Yes, we have many pipelines that work with nuget packages currently working on that server.

     

    Running on a hosted machine works indeed, but does not fix my problem.

  • David Jenni Profile Picture
    Microsoft Employee on 22 Jun 2020 at 20:25:11
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    @rfontijn does a regular nuget AzDevOps task work on this VM?

     

    The local NetworkService acct should allow the unauthenticated call to nuget.org that the ToolInstaller task is executing.
    Alternatively, try running your pipeline on one of the AzureDevOps hosted windows agents

  • adsdsad Profile Picture
    15 on 22 Jun 2020 at 08:09:07
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    The agent is not behind a proxy as far as I can see. It is just a regular Azure VM instance with the agent installed.

    When I go to the OData URL manually from that VM, it just downloads the json file perfectly. (that is of course not under the 'network service' account the agent runs with)

     

    I just deleted all the locally downloaded tasks on the agent and restarted the pipeline resulting with the same error.

     

    Is there anything I can run or check to diagnose this?

  • David Jenni Profile Picture
    Microsoft Employee on 19 Jun 2020 at 17:55:20
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    @rfontijn does the error you see reproduce easily or is this a one-off error?

    Generally speaking: The ToolInstaller task does need to be able to reach powershellgallery.com, nuget.org and any 301/302 redirects those might reply with. All that communication is anonymous only.


    I've looked at the logs in the 13.zip:
    - the calls to PowershellGallery.com to download the needed PS modules succeeded

    - the nuget.org download for the Microsoft.CrmSdk.CoreTools .nupkg gets initiated, but then fails when the standard PS nuget package provider does its OData query.
    It clearly can't parse the data it received. Is it possible that your build agent is behind a proxy that returns e.g. an authN page or similar?

    2020-06-19T10:15:19.4806771Z ##[debug]Searching repository 'https://api.nuget.org/v3/index.json/FindPackagesById()?id='Microsoft.CrmSdk.CoreTools'' for ''.
    2020-06-19T10:15:19.4831896Z ##[debug]00:00:00.6224489 Downloading 'https://api.nuget.org/v3/index.json/FindPackagesById()?id='Microsoft.CrmSdk.CoreTools'&$skip=0&$top=40'.
    2020-06-19T10:15:19.4961536Z ##[debug]00:00:00.6430063 Completed downloading 'https://api.nuget.org/v3/index.json/FindPackagesById()?id='Microsoft.CrmSdk.CoreTools'&$skip=0&$top=40'.
    2020-06-19T10:15:19.5089749Z ##[debug]00:00:00.6486181 System.AggregateException: One or more errors occurred. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. 

  • cchannon Profile Picture
    4,702 Moderator on 19 Jun 2020 at 15:40:44
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    Well, that is plenty strange alright. So you're getting an XML read error on your configs when trying to download 'Microsoft.CrmSdk.CoreTools'

     

    What that xml config is, I am not sure, but it reports it at line 1, position 1, so maybe the file isn't there at all or maybe the data is corrupt somehow?

     

    Have you tried just re-downloading the install package in case something went wrong when you pulled it down the first time?

  • adsdsad Profile Picture
    15 on 19 Jun 2020 at 13:56:51
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    Yes, Power Platform Build Tools.

     

    https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.PowerPlatform-BuildTools&ssr=false#overview

     

    Ok attached a doc file (since .txt is not permitted here)

  • cchannon Profile Picture
    4,702 Moderator on 19 Jun 2020 at 13:28:13
    Re: PowerPlatform tool installer gives me a nuget error on private build agent

    2 things:

     

    • Please provide your attachments in a safe file format (not zip) so no one has to hesitate about downloading them.
    • What are you installing? Power Platform Build Tools? PCF? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete