Spero che qualcuno possa aiutare a diagnosticare cosa sta andando storto con la mia build. Sto usando Visual Studio 2012, NuGet 2.7, & Servizio TFS (git). Sono stato in grado di aggirare il seguente errore:NuGet Pacchetto errore mancante durante il tentativo di utilizzare TFS Servicice
"C:\a\src\src\RecipeDb.Mvc\RecipeDb.Mvc.csproj (361): This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567."
Ho permesso a ripristinare il pacchetto di funzionalità (ma credo di aver sentito con NuGet 2.7 non importa). In ogni modo ho trovato un blog utile su questo problema: Blog Article
Qui è il mio attuale script di build:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutDir>$(MSBuildThisFileDirectory)bin</OutDir>
<Configuration>Release</Configuration>
<ProjectProperties>
OutDir=$(OutDir);
Configuration=$(Configuration);
</ProjectProperties>
</PropertyGroup>
<ItemGroup>
<Solution Include="$(MSBuildThisFileDirectory)src\*.sln" />
</ItemGroup>
<Target Name="RestorePackages">
<Exec Command=""$(MSBuildThisFileDirectory)src\.nuget\NuGet.exe" restore "%(Solution.Identity)"" />
</Target>
<Target Name="Clean">
<MSBuild Targets="Clean"
Projects="@(Solution)"
Properties="$(ProjectProperties)" />
</Target>
<Target Name="Build" DependsOnTargets="RestorePackages">
<MSBuild Targets="Build"
Projects="@(Solution)"
Properties="$(ProjectProperties)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="RestorePackages">
<MSBuild Targets="Rebuild"
Projects="@(Solution)"
Properties="$(ProjectProperties)" />
</Target>
</Project>
e qui è il mio log di compilazione:
Build started 9/27/2013 1:01:14 AM.
Project "C:\a\src\build.proj" on node 1 (default targets).
RestorePackages:
"C:\a\src\src\.nuget\NuGet.exe" restore "C:\a\src\src\RecipeDb.sln"
Project "C:\a\src\build.proj" (1) is building "C:\a\src\src\RecipeDb.sln" (2) on node 1 (Build target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Project "C:\a\src\src\RecipeDb.sln" (2) is building "C:\a\src\src\RecipeDb.Mvc\RecipeDb.Mvc.csproj" (3) on node 1 (default targets).
C:\a\src\src\RecipeDb.Mvc\RecipeDb.Mvc.csproj(361,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.
Done Building Project "C:\a\src\src\RecipeDb.Mvc\RecipeDb.Mvc.csproj" (default targets) -- FAILED.
Project "C:\a\src\src\RecipeDb.sln" (2) is building "C:\a\src\src\RecipeDb.Mvc.Tests\RecipeDb.Mvc.Tests.csproj" (5) on node 1 (default targets).
C:\a\src\src\RecipeDb.Mvc.Tests\RecipeDb.Mvc.Tests.csproj(144,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.
Done Building Project "C:\a\src\src\RecipeDb.Mvc.Tests\RecipeDb.Mvc.Tests.csproj" (default targets) -- FAILED.
Done Building Project "C:\a\src\src\RecipeDb.sln" (Build target(s)) -- FAILED.
Done Building Project "C:\a\src\build.proj" (default targets) -- FAILED.
Build FAILED.
"C:\a\src\build.proj" (default target) (1) ->
"C:\a\src\src\RecipeDb.sln" (Build target) (2) ->
"C:\a\src\src\RecipeDb.Mvc\RecipeDb.Mvc.csproj" (default target) (3) ->
(EnsureBclBuildImported target) ->
C:\a\src\src\RecipeDb.M
vc\RecipeDb.Mvc.csproj(361,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.
"C:\a\src\build.proj" (default target) (1) ->
"C:\a\src\src\RecipeDb.sln" (Build target) (2) ->
"C:\a\src\src\RecipeDb.Mvc.Tests\RecipeDb.Mvc.Tests.csproj" (default target) (5) ->
C:\a\src\src\RecipeDb.Mvc.Tests\RecipeDb.Mvc.Tests.csproj(144,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:09.21
così ho copiato la sua corporatura registra e ha appena modificato il percorso in cui si trova nuget.exe. Il comando Nuget.exe sembra essere in esecuzione ma a quanto pare non sta scaricando i pacchetti. Naturalmente la costruzione a livello locale funziona bene (anche se si elimina la directory di pacchetti
@James, penso che sia stato un complimento. Ho appena pubblicato la parte dal link che stava cercando di essere utile per risolvere il problema. È prassi comune in StackOverflow pubblicare la parte richiesta dai collegamenti che stai postando perché il contenuto del link potrebbe essere mutilato in futuro, ma anche questi post dovrebbero essere significativi. – RinoTom
Costruire due volte non funziona per me :(Ottengo lo stesso errore due volte: '" C: \ percorso \ progetto.csproj "(destinazione predefinita) (4) -> (destinazione AssicuratoBclBuildImported) -> C: \ percorso \ project.csproj (142,5): errore: questo progetto fa riferimento a pacchetti NuGet mancanti su questo computer. Abilitare NuGet Package Restore per scaricarli. Per ulteriori informazioni, vedere http://go.microsoft.com/ fwlink /? LinkID = 317567. –