none
New to TFS 2010 build question

    Întrebare

  • Hi,   We have a project that will build fine when doing msbuild project.sln from the dos command line.  (we are using the .Net 3.5 version of msbuild).   However on the same machine we have configured a TFS build to also build that same solution.    With the TFS configured build I get the following errors.

     

    Build started 7/20/2011 8:50:51 AM.
    Project "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb.sln" on node 1 (default targets).
    ValidateSolutionConfiguration:
      Building solution configuration "Release|Any CPU".
    Project "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb.sln" (1) is building "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb\OnLifeWeb.csproj" (2) on node 1 (default targets).
    EntityDeploy:
      Processing 0 EDMX files.
      Finished processing 0 EDMX files.
    PrepareForBuild:
      Creating directory "obj\Release\".
      md "obj\Release\"
    ResolveAssemblyReferences:
      Primary reference "OnLife".
          Could not find dependent files. Expected file "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.dll" does not exist.
          Could not find dependent files. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
          Resolved file path is "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.dll".
          Reference found at search path location "".
      Primary reference "OnLife.Repository.LTS".
          Could not find dependent files. Expected file "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.LTS.dll" does not exist.
          Could not find dependent files. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
          Resolved file path is "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.LTS.dll".
          Reference found at search path location "".
      Primary reference "OnLife.Repository".
          Could not find dependent files. Expected file "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.dll" does not exist.
          Could not find dependent files. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
          Resolved file path is "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.dll".
          Reference found at search path location "".
    CoreCompile:
      C:\Windows\Microsoft.NET\Framework64\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:"e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.dll" /reference:"e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.dll" /reference:"e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.LTS.dll" /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Configuration.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.EnterpriseServices.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Web.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Web.Mobile.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Web.Services.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug:pdbonly /optimize+ /out:obj\Release\OnLifeWeb.dll /target:library contact.aspx.cs contact.aspx.designer.cs contact_directions.aspx.cs contact_directions.aspx.designer.cs contact_request.aspx.cs contact_request.aspx.designer.cs Default.aspx.cs Default.aspx.designer.cs employment.aspx.cs employment.aspx.designer.cs em_brandEvolution.aspx.cs em_brandEvolution.aspx.designer.cs em_coachingMethods.aspx.cs em_coachingMethods.aspx.designer.cs em_coachingProcess.aspx.cs em_coachingProcess.aspx.designer.cs em_coachingProducts.aspx.cs em_coachingProducts.aspx.designer.cs em_healthAssessment.aspx.cs em_healthAssessment.aspx.designer.cs em_howWeHelp.aspx.cs em_howWeHelp.aspx.designer.cs em_managementTeam.aspx.cs em_managementTeam.aspx.designer.cs em_newsEvents.aspx.cs em_newsEvents.aspx.designer.cs em_onlineExperience.aspx.cs em_onlineExperience.aspx.designer.cs em_onsiteServices.aspx.cs em_onsiteServices.aspx.designer.cs em_realEngagement.aspx.cs em_realEngagement.aspx.designer.cs em_realResults.aspx.cs em_realResults.aspx.designer.cs em_realResults_testimonials.aspx.cs em_realResults_testimonials.aspx.designer.cs em_realResults_testimonials_all.aspx.cs em_realResults_testimonials_all.aspx.designer.cs em_scientificBoard.aspx.cs em_scientificBoard.aspx.designer.cs em_whoWeAre.aspx.cs em_whoWeAre.aspx.designer.cs em_whyWereDifferent.aspx.cs em_whyWereDifferent.aspx.designer.cs healthOfBusinessGrant.aspx.cs healthOfBusinessGrant.aspx.designer.cs HttpModules\LandingPageModule.cs Masters\GeneralContent.Master.cs Masters\GeneralContent.Master.designer.cs Masters\HomePage.Master.cs Masters\HomePage.Master.designer.cs Masters\Main.Master.cs Masters\Main.Master.designer.cs Masters\Mobile.Master.cs Masters\Mobile.Master.designer.cs Masters\Nintendo.Master.cs Masters\Nintendo.Master.designer.cs Mobile\confirm.aspx.cs Mobile\confirm.aspx.designer.cs Mobile\Default.aspx.cs Mobile\Default.aspx.designer.cs Nintendo\Default.aspx.cs Nintendo\Default.aspx.designer.cs poc_calculator.aspx.cs poc_calculator.aspx.designer.cs poc_dockMenu.aspx.cs poc_dockMenu.aspx.designer.cs Product_Videos\liveOnPortal.aspx.cs Product_Videos\liveOnPortal.aspx.designer.cs Product_Videos\ondemandPortal.aspx.cs Product_Videos\ondemandPortal.aspx.designer.cs Properties\AssemblyInfo.cs terms_of_service.aspx.cs terms_of_service.aspx.designer.cs WebControls\ForgotLogin.ascx.cs WebControls\ForgotLogin.ascx.designer.cs WebControls\LoginBox.ascx.cs WebControls\LoginBox.ascx.designer.cs
    CSC : error CS0006: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.dll' could not be found [e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb\OnLifeWeb.csproj]
    CSC : error CS0006: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.dll' could not be found [e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb\OnLifeWeb.csproj]
    CSC : error CS0006: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.LTS.dll' could not be found [e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb\OnLifeWeb.csproj]
    Done Building Project "e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Sources\OnlifeMarketing\OnLifeWeb\OnLifeWeb.csproj" (default targets) -- FAILED.

     

    I think I must not understand the reason for the binaries folder.  Again, this solution builds fine using msbuild project.sln from a dos command line  on the same system that has the build agent configured.

     

    Any suggestions?

    20 iulie 2011 16:04

Toate mesajele

  • One thing I did not mention above is that in our project.sln file represents a website and when we build from a dos command line or from teamcity(similar), we have the resulting binaries placed in the website\bin folder and not in a seperate ..\binaries folder that is outside of the project.    This is the reason I am not understanding the binaries folder.

    Does any body know where I can figure out the differences between TFS initiated builds and the msbuild command line version that works for us?

    20 iulie 2011 19:15
  • Ok I just figured out what was wrong.  I never specified the platform on the build type.  I did specify Release build but not .NET as the platform.

    20 iulie 2011 19:22
  • Hi   I was mistaken.   When I changed the platform it just caused an error without showing up as a broke build.  

     

    I am still getting the error below.

     

     CSC: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.dll' could not be found
     CSC: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.dll' could not be found
     CSC: Metadata file 'e:\tfs_builds\Onlife\OnlifeMarketing Release Build\Binaries\OnLife.Repository.LTS.dll' could not be found

     

    even though the same solution builds on a dos command prompt on the same machine that the build agent is on.  (eg, msbuild project.sln)

    21 iulie 2011 14:04
  • Did you manage to solve this??

     

    Cheers

     

    Colin

    22 noiembrie 2011 17:08
  • Hey Lance,

    I too would like to know how you solved this.

     

    Kind Regards

     

    Chris

    23 noiembrie 2011 10:50
  • I believe TFS build redirects compiled dll's to the Binaries directory on the Build Agent as a way to ease deployment.  This does not happen when you compile from the command line or say in Visual Studio (devenv.exe).  I think if you remove the OutDir property where TFS build invokes MSBuild.exe, the binaries will end up in the debug or release folders as expected.


    -7

    2 martie 2012 01:40
  • Hello,

    I am having the same issue. Did anyone resolved it?

    Please let me know.

    Thanks

    7 august 2012 12:29