MSBUILD : error MSB1008: Only one project can be specified

前端 未结 18 761
眼角桃花
眼角桃花 2021-01-30 09:39

Why am I getting the following Build error?

C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe C:\\Code\\EduBenesysNET\\EduBenesysNET\\EduBenesysNET.vbproj /t:pu         


        
相关标签:
18条回答
  • 2021-01-30 10:25

    This problem appears when you have a path or a property containing a space and that is not quoted.

    All your properties and path have quote around them, it's strange. The error message indicates Education as a switch, try to remove /p:ProductName="Total Education TEST" to see if it works.

    0 讨论(0)
  • 2021-01-30 10:25

    Just in case someone has the same issue as me, I was missing "/" before one of the "/p" arguments. Not very clear from the description. I hope this helps someone.

    0 讨论(0)
  • 2021-01-30 10:27

    Yet another cause and solution to this: Check that you didn't put a space in the wrong place, i.e. in parameters; mine was dotnet -c Release - o /home/some/path (note the space between - and o), I kept looking at the path itself, which was correct and threw me off. Hope that helps! (this was in Bash though it should also apply to Windows)

    0 讨论(0)
  • 2021-01-30 10:31

    I was using single quotes around the password parameter when I got the error

    /p:password='my secret' bad

    and changed it to use double quotes to resolve the issue.

    /p:password="my secret" good

    Likely the same would apply to any parameter that needs quotes for values that contain a space.

    0 讨论(0)
  • 2021-01-30 10:32

    For me I had forgot to add closing quote

    /p:DeployOnBuild=true;OutDir="$(build.artifactstagingdirectory)

    to

    /p:DeployOnBuild=true;OutDir="$(build.artifactstagingdirectory)"

    0 讨论(0)
  • 2021-01-30 10:34

    If you use default workspace in Jenkins, this might occur. Use custom workspace location without any spaces.

    0 讨论(0)
提交回复
热议问题