2

Visual Studio Team ServicesでNuGet復元ステップを実行中にエラーが発生しましたスタジオオンライン)。特別な設定はしていませんでしたが、エラーが表示されます。エラーは次のとおりです。VSTS NuGetステップの復元エラー:CallSite.Target(Closure、CallSite、Object、Object)でnull値の式のメソッドを呼び出すことはできません

2016-04-10T16:53:36.3476846Z ##[debug]Adding credentials section to NuGet.config
2016-04-10T16:53:36.5691737Z ##[error]System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
2016-04-10T16:53:36.5701787Z ##[error] at CallSite.Target(Closure , CallSite , Object , Object)
2016-04-10T16:53:36.5711737Z ##[error] at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
2016-04-10T16:53:36.5721738Z ##[error] at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
2016-04-10T16:53:36.5721738Z ##[error] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

ここにすべての詳細があります。いくつかのスクリーンショットの開始時:

Configuration Bild Step in VSO
Logs from output console in VSO

私の主なnuget設定ファイルは次のようになります。

<?xml version="1.0" encoding="utf-8"?> 
<repositories> 
    <repository path="..\Aleksandra.Tests\packages.config" /> 
    <repository path="..\Aleksandra\packages.config" /> 
</repositories> 

次subconfigsは、これらのようになります。

<?xml version="1.0" encoding="utf-8"?> 
<packages> 
    <package id="Antlr" version="3.4.1.9004" targetFramework="net45" /> 
    <package id="bootstrap" version="3.0.0" targetFramework="net45" /> 
    <package id="EntityFramework" version="6.1.3" targetFramework="net45" /> 
    <package id="jQuery" version="1.10.2" targetFramework="net45" /> 
    <package id="jQuery.Validation" version="1.11.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" /> 
    <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" /> 
    <package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net45" /> 
    <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> 
    <package id="Modernizr" version="2.6.2" targetFramework="net45" /> 
    <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" /> 
    <package id="Owin" version="1.0" targetFramework="net45" /> 
    <package id="Respond" version="1.2.0" targetFramework="net45" /> 
    <package id="WebGrease" version="1.5.2" targetFramework="net45" /> 
</packages> 

...そして..

<?xml version="1.0" encoding="utf-8"?> 
<packages> 
    <package id="EntityFramework" version="6.1.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" /> 
    <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" /> 
    <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> 
</packages> 

答えて

3

パッケージの復元についてはthisの記事をご覧ください。重要な点を引用するために、repositores.configファイルは必要に応じて自動的に再生成されます。同じことが一般的にpackagesフォルダーに適用されます。ソース管理からそれらを安全に削除することができます。

また、のパスをNuGet.configのテキストボックスに空白のままにすることもできます。特別なニーズ(例:認証が必要な非公開フィード)がない限り、そのファイルは必要ありません。すべてpackages.configファイルがソリューションで選択されます。

+0

神様、私はこの問題を解決するために多くの時間を費やしました。 Repositories.configを削除するだけでこれを解決できました。だからこそ簡単な解決策でもありません。どうもありがとう。 –

関連する問題