question

jcsilva87 avatar image
1 Vote"
jcsilva87 asked jcsilva87 commented

MSBuild error MSB4057 after updating to VS 2019 16.10.0

The command below worked flawlessly before updating to VS 2019 16.10.0:

 msbuild.exe MySolution.sln /t:Project1;Project2;Project3 /p:Configuration=Release /p:DebugType=None /p:OutputPath="C:\Users\myuser\Desktop\Build"

After the update I'm getting the message error MSB4057: the target "Project1" does not exist in the project when I try the command in Developer Command Prompt of VS 2019.

vs-msbuild
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

They fixed it in VS 2019 16.10.1

0 Votes 0 ·

1 Answer

jcsilva87 avatar image
3 Votes"
jcsilva87 answered MarceloCabralGhilardi-6244 commented

Now you must add ":Rebuild" after the name of the projects for it to work.

 msbuild.exe MySolution.sln /t:Project1:Rebuild;Project2:Rebuild;Project3:Rebuild /p:Configuration=Release /p:DebugType=None /p:OutputPath="C:\Users\myuser\Desktop\Build"


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Rebuild works, but how to make Build?
Also works Link and Clean

0 Votes 0 ·

I believe for doing just a build you had to put nothing in front of the project's name.
This option isn't working anymore.

0 Votes 0 ·

Thanks! I was facing this issue with an Azure DevOps pipeline that was suddenly failing without any relevant changes. The rebuild flag fixed it 🤷‍♂️

0 Votes 0 ·

Its save my life
:)
Tks

0 Votes 0 ·