2013-02-09 22 views
7

Skonfigurowałem projekt w kontrolerze budowania TFS, ale mam do czynienia z kompilacją nie powiodło się po kolejnej nowej kompilacji. W logu znalazłem błąd z brakującymi referencjami, gdy sprawdziłem wszystkie pliki.Budowanie Tfs nie powiodło się

W jaki sposób mogę debugować i tworzyć dobrze skompilowany zip tfs.

Build FAILED.

"C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp.sln" (default target) (1) -> 
    "C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj" (default target) (2) -> 
    (ResolveAssemblyReferences target) -> 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Optimization". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.AspNet, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OAuth.Consumer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OAuth, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OpenId, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OpenId.RelyingParty, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "WebGrease". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Antlr3.Runtime". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 


    "C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp.sln" (default target) (1) -> 
    "C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj" (default target) (2) -> 
    (CoreCompile target) -> 
    App_Start\BundleConfig.cs(2,18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Controllers\AccountController.cs(8,7): error CS0246: The type or namespace name 'DotNetOpenAuth' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Filters\InitializeSimpleMembershipAttribute.cs(3,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Global.asax.cs(7,18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(4,45): error CS0234: The type or namespace name 'Schema' does not exist in the namespace 'System.ComponentModel.DataAnnotations' (are you missing an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(12,33): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    App_Start\BundleConfig.cs(9,44): error CS0246: The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(19,16): error CS0246: The type or namespace name 'DbSet' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(26,10): error CS0246: The type or namespace name 'DatabaseGeneratedAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(26,10): error CS0246: The type or namespace name 'DatabaseGeneratedAttributeAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(22,6): error CS0246: The type or namespace name 'Table' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 
    Models\AccountModels.cs(22,6): error CS0246: The type or namespace name 'TableAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Builds\1\SourceCode\MvcApp\Sources\MainLine\Mvc App\MvcApp\MvcApp\MvcApp.csproj] 

11 Warning(s) 
12 Error(s) 

czas, który upłynął 00: 00: 06,40

Odpowiedz

3

Musisz umieścić wszystkie te dll na komputerze kompilacji. Prostym sposobem jest użycie NuGet do zarządzania swoimi pakietami i skonfigurowania go, aby usunąć brakujące biblioteki dll. Lub możesz ręcznie dodać je do maszyny budującej.

1

wiem, że to jest stare pytanie, ale tutaj jest jak dostałem tej pracy.

I przestrzegać instrukcji od Daniela Millera powyżej: http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

Potem musiałem użyć prostego pliku kompilacji, które są opisane w tym linku http://docs.nuget.org/docs/reference/package-restore-with-team-build które po prostu uruchamia pakiet przywrócić wcześniej.

Wszystko, co musiałem zmienić z pliku kompilacji, było ścieżką do mojego pliku rozwiązania, a plik nuget.exe był inny niż mój.

Następnie skonfigurowałem TFS, aby używał pliku build.proj zamiast rozwiązania.

+0

Dzięki, próbowałem odnieść się do rozwiązania bezpośrednio, i to nie działało. Utworzenie oddzielnego pliku TFSBuild.proj zadziałało! – Narayana

+0

@Narayana Nie ma problemu, cieszę się, że to zadziałało. Dodałem go do innych pytań, a ludzie go zlekceważyli. Sprawdziło się doskonale dla mnie. :) – hutchonoid

Powiązane problemy