Jenkins Build Error - MSBUILD : error MSB1009: Project file does not exist

33,264

Solution 1

You should not use the remote URL but the local path. I guess it will be something like:

.\Hubble\hubble.sln

The plugin will work inside the working directory, which can be found on your build machine at:

<JENKINS_DIR>\jobs\<JOB NAME>\workspace

Solution 2

You are checking out the code! You will need to specify the local path to the solution. meaning, something like $WORKSPACE/Path/To/sln.file

Good luck

Share:
33,264
Simon
Author by

Simon

Updated on November 12, 2021

Comments

  • Simon
    Simon over 2 years

    I am trying to create a Jenkins job that will build my .NET web application from an SVN repository that I manage with VisualSVN.

    I have added the URL of the project folder in the repository trunk folder to the Jenkins job and when I execute the job it runs fine with no errors.

    SVN screenshot

    I then go onto the build step using "Build a Visual Studio Project or Solution using MSBuild", where I enter the full url of the .sln file.

    MSBuild Screenshot

    I have configured MSBuild as below and using 4.0 as this is what my application is built in.

    MSBuild Settings

    Extract from .csProj file:

    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    

    When I run the job it fails with the following error

    MSBUILD : error MSB1009: Project file does not exist.
    

    MSB1009 screenshot

    But when I click the link in the screenshot above it opens the file in a browser window?

    Any ideas are greatly appreciated?

  • Simon
    Simon over 7 years
    That fixed it for this problem thanks! But I did get a "Microsoft.WebApplication.targets not found error" afterwards. This is due to the server running Jenkins not having Visual Studio installed. Solution found here: stackoverflow.com/questions/16886134/…