2013-02-09 36 views
7

Tôi đã định cấu hình dự án trong bộ điều khiển xây dựng TFS nhưng tôi đang đối mặt với việc xây dựng không thành công sau khi xây dựng hàng đợi mới.Trong nhật ký tôi tìm thấy lỗi tham chiếu bị thiếu trong khi tôi đã kiểm tra tất cả các tệp.Xây dựng Tfs không thành công

Cách tôi có thể gỡ lỗi và tạo zip xây dựng tốt.

Xây dựng 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) 

thời gian trôi qua 00: 00: 06,40

Trả lời

3

Bạn cần phải đặt tất cả những của dll vào xây dựng máy tính của bạn. Cách dễ dàng là sử dụng NuGet để quản lý các gói của bạn và cấu hình nó để kéo các dll còn thiếu. Hoặc bạn có thể thêm chúng vào máy xây dựng theo cách thủ công.

1

Tôi biết đây là một câu hỏi cũ nhưng đây là cách tôi đã làm việc này.

Tôi đi theo các hướng dẫn từ Daniel Miller trên: http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

sau đó tôi đã phải sử dụng tập tin build đơn giản mà được đề cập trong liên kết này http://docs.nuget.org/docs/reference/package-restore-with-team-build mà chỉ đơn giản kích hoạt gói khôi phục trước đó.

Tất cả những gì tôi phải thay đổi từ tệp xây dựng là đường dẫn đến tệp giải pháp của tôi và nuget.exe như tôi đã phân biệt.

Sau đó, tôi đã định cấu hình TFS để sử dụng tệp build.proj thay vì giải pháp.

+0

Cảm ơn, tôi đã cố gắng tham khảo giải pháp trực tiếp và nó không hoạt động. Tạo một tệp TFSBuild.proj riêng biệt đã hoạt động! – Narayana

+0

@Narayana Không sao cả, tôi rất vui vì nó đã làm việc cho bạn. Tôi đã thêm nó vào các câu hỏi khác và mọi người đã downvoted nó. Làm việc tuyệt vời cho tôi. :) – hutchonoid

Các vấn đề liên quan