Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Build of .NET 4.5 Solution fails if a Test project is added

    Scheduled Pinned Locked Moved Support
    buildmasternet
    3 Posts 1 Posters 71 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I have a test application which is written using .NET 4.5 in Visual Studio 2012. I have sucessfully retrieved this from GIT and built this project using Buildmaster.

      I am now trying to add a test project for Buildmaster to run to verify the tests for the project pass. However on adding my test project to the solution the project will now not build in Buildmaster. It gives the following error.

      C:\BuildMaster_SVCTMP_A9\Src\TestProject\UnitTest1.vb(2,9): warning BC40056: Namespace or type specified in the Imports 'Microsoft.VisualStudio.TestTools.UnitTesting' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
      C:\BuildMaster_SVCTMP_A9\Src\TestProject\UnitTest1.vb(4,2): error BC30002: Type 'TestClass' is not defined.
      C:\BuildMaster_SVCTMP_A9\Src\TestProject\UnitTest1.vb(6,6): error BC30002: Type 'TestMethod' is not defined.
      C:\BuildMaster_SVCTMP_A9\Src\TestProject\UnitTest1.vb(7,9): error BC30389: 'System.Diagnostics.Assert' is not accessible in this context because it is 'Friend'.
      Done building project "TestProject.vbproj" -- FAILED.
      Done building project "XMPPDeviceClient.sln" -- FAILED.
      Build failed (msbuild returned 1).

      Product: BuildMaster
      Version: 4.9.7

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        This error is related to your msbuild configuration, so it might be easiest to search against that error + msbuild.

        I'm not too familiar with the specific error message, but I believe that a .targets or .dll file is missing on the buildmaster server. You should be able to reproduce the exact error by running the exact command that buildmaster is running on the server, from the command line.

        From there, you can install/debug as needed.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Thanks for the help... in the end I found I needed to install Microsoft Visual Studio 2012 Agents on the build server. The project was then able to build successfully.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation