2016-04-28 37 views
0

セットアップ:2015年アップデート2 TFS 2015 OnPrem Nuget復元エラー

  • ビルドエージェントが
    • のVisual Studio 2015 Update 2には、ビルドシステムにインストールされているWindows 2012 Server上で実行されている

      • TFS

    enter image description here

    VS 2015 Update 2がインストールされているエージェントでビルド(新規)定義を実行しています。私はそれにいくつかのNuGetパッケージを持っているプロジェクトを持っています。今日の午後まではビルドは期待通りに動いていた。今これは私が迷子ところ、私はNuGet.orgをチェックし、パッケージと、このバージョンが存在している

    2016-04-28T16:35:03.3605826Z Set workingFolder to default: E:\agent\tasks\NuGetInstaller\0.1.17

    2016-04-28T16:35:03.4073604Z Executing the powershell script: E:\agent\tasks\NuGetInstaller\0.1.17\NuGetInstaller.ps1

    2016-04-28T16:35:05.0948829Z Saving to E:\agent_work\1\NuGet\newNuGet.config

    2016-04-28T16:35:05.1418632Z E:\agent\agent\worker\tools\NuGet.exe restore "E:\agent_work\1\s\Dev\eCommerce\Consol.eCommerce.sln" -NonInteractive -configfile "E:\agent_work\1\NuGet\newNuGet.config"

    2016-04-28T16:35:05.8761260Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.

    2016-04-28T16:35:06.6105618Z Restoring NuGet package System.Reflection.Metadata.1.2.0.

    2016-04-28T16:35:08.9542747Z WARNING: Unable to find version '1.2.0' of package 'System.Reflection.Metadata'.

    2016-04-28T16:35:09.0012648Z ##[error]Unable to find version '1.2.0' of package 'System.Reflection.Metadata'.

    2016-04-28T16:35:09.0323998Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe

    :私はそれが行われたときにビルドを置く場所にいくつかの変更を行った後、私はこのエラーを取得し始めました。私は自分のローカルシステム上でプロジェクトのすべてのパッケージを削除してから、NuGet Package Restoreを実行してもうまくいきました。私はプロジェクトからNuGetパッケージを削除し、それを再追加して正常に動作しました。

    これを見て修正方法を知っている人はいますか?

    更新済み29/4/2016: 以下のコメントで述べたように、私はそれを整理しました。 私の元nuget.configファイルは、私はこれにそれを変更し、それが新しい質問がある

    <configuration> 
        <solution> 
         <add key="disableSourceControlIntegration" value="true" /> 
        </solution> 
        <packageSources> 
        <add key="NuGet official package source v3" value="https://api.nuget.org/v3/index.json" /> 
        <add key="NuGet official package source v2" value="https://nuget.org/api/v2/" /> 
        <add key="FelineSoft NuGet" value="http://prod-tfs15:81/nuget" /> 
        </packageSources> 
        <activePackageSource> 
        <add key="All" value="(Aggregate source)" /> 
        </activePackageSource> 
    </configuration> 
    

    を働いたこの

    <configuration> 
        <solution> 
         <add key="disableSourceControlIntegration" value="true" /> 
        </solution> 
        <packageSources> 
        <add key="NuGet official package source v2" value="https://nuget.org/api/v2/" /> 
        <add key="FelineSoft NuGet" value="http://prod-tfs15:81/nuget" /> 
        </packageSources> 
        <activePackageSource> 
        <add key="All" value="(Aggregate source)" /> 
        </activePackageSource> 
    </configuration> 
    

    だった、なぜAPIエンドポイントは、このようなコメントパッケージには関係ありませんか?

  • 答えて

    0

    これは、Visual Studioが使用しているnugetクライアントのバージョンによって異なります。次に、nugetクライアントは特定のバージョンのapiを消費することを期待しています。

    0

    エラー情報によると、これはビルドエージェントの作業ディレクトリが変更されたために発生する可能性があります。あなたがビルドを置く場所を変更したので。これにより、エラーが発生する可能性があります。

    ビルドエージェントの作業ディレクトリを削除し、自動的に再作成させることができます。それからもう一度試してみてください。


    更新

    System.Reflection.Metadata 1.2.0のみNuGet 2.8.6以上が必要です。 NuGetフィードv3(VS 2015/NuGet v3.x)の場合:https://api.nuget.org/v3/index.json、NuGetフィードv2(VS 2013以前およびNuGet 2.x)の場合:https://www.nuget.org/api/v2。あなたはVS2015を使用しているので、おそらくV3のURLを追加するのはやりました。

    +0

    私はそれを昨日と今日複数回行いましたが、最終的には今朝それを分類しましたが、解決策は問題よりもさらに意味がありません。私が見つけた解決策を示すために質問を更新します。 –

    +0

    System.Reflection.Metadata 1.2.0には、NuGet 2.8.6以上が必要です。 NuGetフィードv3(VS 2015/NuGet v3.x):https://api.nuget.org/v3/index.json、NuGetフィードv2(VS 2013以前およびNuGet 2.x):https:// www.nuget.org/api/v2。あなたはVS2015を使用しているので、おそらくV3のURLを追加するのはやりました。 –

    関連する問題