7
votes

I configured project in TFS build controller but i am facing build failed after queue new build.In log i found error of references missing while i have checked in all the files.

How i can debug and create fine tfs build zip.

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)

Time Elapsed 00:00:06.40

3

3 Answers

3
votes

You need to put all of those dll's on your build machine. Easy way is to use NuGet to manage your packages and configure it to pull down the missing dlls. Or you can manually add them to the build machine.

1
votes

I know this is an old question but here is how I got this working.

I followed the instructions from Daniel Miller above: http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

I then had to use the simple build file that is mentioned in this link http://docs.nuget.org/docs/reference/package-restore-with-team-build which simply triggers the package restore beforehand.

All I had to change from the build file was the path to my solution file and the nuget.exe as mine differed.

I then configured TFS to use the build.proj file rather than the solution.