locked
Issue with Project references in TFS Build RRS feed

  • Question

  • In my web application, I have 6 CS Projects in a solution. The main .NET project has reference to other projects. The reference is added through project reference not the dlls and dependencies are set between the projects. The build is working fine directly with Visual Studio. However when I Configure TFS build and try to do the build, it is failing with the reference error.

    We are using Visual Studio 2010 Prof edition and Team Foundation Server 2010.

    Can someone help us with your suggestion to fix this issue ?

    Thanks a lot in advance

    Regards

    Jabasingh S

    Tuesday, October 22, 2013 5:35 PM

Answers

  • Hi Jabasingh,

    As far as I know it is required to have VS installed on your build machine. But as Raj said it is not good to have TFS app tier server as a build server.

    The best way would be to setup a separate build machine and have VS installed there.

    Cheers!

    Chaminda

    • Marked as answer by Cece Dong Friday, November 1, 2013 2:36 AM
    Thursday, October 24, 2013 7:51 AM

All replies

  • HI Jabasingh,

    This could be due to your project reference may be referring to local paths. You can verify this in VS by right click--> unloading the project(the Main project in your case) and then right click and edit. in the project file check the references to other projects has relative paths something similar to below.

     <ProjectReference Include="..\Library\Library.csproj">

    Then check TFS build definition to verify your workspace settings whether it is creating the correct relative paths in build agent.

    If you could post the build error in build detail log and the project hierarchy (folder structure) and you build definition workspace settings here(image of it), would be able to help you more.

    Hope this helps.

    Cheers!

    Chaminda

    Tuesday, October 22, 2013 5:57 PM
  • Hi Jabasingh,

    I agree with Chaminda, you can check whether you use the absolute paths. And also the details of build error is helpful. You can set "Logging Verbosity" to Diagnostic in build definition and then see the build log after building. Also check event viewer to see if there any useful error info.

     

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 23, 2013 6:34 AM
    Moderator
  • Hi Chaminda,

    Thanks for your response. Currently all the references in the project is relative. There is no local path mapped.

    My Project hierarchy (It is listed as per the project depencies)

    Project 1             has external references

    Project 2             has external references

    Project 3             has external references

    Project 4             has external references

    Project 5             has external references

    Project 6 (Startup Project)        refers Project 3, Project 4 and Project 5 through Project references and external library reference through direct dll reference.

    The External library reference is working fine.

    I have placed the screenshot in the below location.

    social.msdn.microsoft.com/Forums/getfile/366309

    Please let me know if i can provide some more information.

    Thanks

    Wednesday, October 23, 2013 2:04 PM
  • Basically the difference between you compiling the solution in Visual Studio and Team Foundation Build is that TF Build uses MSBuild to compile the solution.

    Therefore what you should try is compile your solution locally using MSBuild instead of using Visual Studio. There are some subtle differences between the two.

    The syntax is as follows:

    MSBuild.exe <solution> /target:Rebuild /p:Configuration=Debug /p:Platform="Any CPU"

    See if your solution compiles that way, if not you found the build problem.

    Wednesday, October 23, 2013 2:19 PM
  • I tried with MSBuild and the build is successful.

    Another point i have to mention here is that Visual Studio is not installed in TFS server. Is it mandatory to install Visual Studio in TFS Server.

    Wednesday, October 23, 2013 3:26 PM
  • Hi Jebasingh,

    Considering your TFS App Server & Build Server are same, you can just install MSBuild for compiling your projects.

    This post can be helpful for you - http://stackoverflow.com/questions/2567018/installing-msbuild-4-0-without-visual-studio-2010

    Its not recommended to have VS in your App tier, as it might hamper the TFS performance. Again, it depends upon the number of users.

    Please Propose as answer if my suggestion is helpful.

    Thanks,

    Raj

    • Proposed as answer by Rajarajan.S Friday, December 5, 2014 6:30 PM
    Wednesday, October 23, 2013 6:05 PM
  • Hi Jabasingh,

    As far as I know it is required to have VS installed on your build machine. But as Raj said it is not good to have TFS app tier server as a build server.

    The best way would be to setup a separate build machine and have VS installed there.

    Cheers!

    Chaminda

    • Marked as answer by Cece Dong Friday, November 1, 2013 2:36 AM
    Thursday, October 24, 2013 7:51 AM
  • Hi Raj,

    Thanks for your response. I will try installing the msbuild in TFS server and try again.

    One more thing i have noticed here is , when i build through Visual Studio, the obj and bin folders created under the project folde. however, when i build through the TFS build, only the obj folder is geting created under the TFS workspace folder. "Bin" folder is not getting created.

    I suspect this could be the reason for my issue. Is there any suggestion or solution to fix this ?

    Thanks

    Regards

    Jabasingh S

    Thursday, October 24, 2013 5:44 PM
  • Hi Jabasingh,

    How is your problem? Is it fixed? Could you share us  your experience?

    Best regards,

    Cece


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 9:02 AM