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



  • 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



  • 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.



  • 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.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation