-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error MSB4057: The target "*****" does not exist in the project . #3475
Comments
Hello @FrancescElies. Thank you for your report. We will take a look. |
Most likely related to upgrade Visual Studio from 16.9 to 16.10. |
Seems to be related to dotnet/msbuild#6373. As you suggested the problem seems to be in What is the plan until this version is released and rolled out in your virtual machines? |
We have to wait for Some earlier discussion and context around it: #2321 (reply in thread) |
I will try to get around this issue with vswhere or using I'll keep you posted. Thanks for your help |
We are seeing this in Azure DevOps. Is there any way of use forcing version 20210516 of the image? |
The minimal trivial reproducible example can be found here in OSS repo: Failing with MSBuild from vs2019 16.10.0 msbuild solution.sln /target:zlib,sqlite The workaround is a bit ugly - scan all affected batch files, all target lists, all vcpkg port files, etc. And append msbuild solution.sln /target:zlib:Rebuild,sqlite:Rebuild Looks like the hot-fix would be available in a few weeks in 16.10.1? But the issue would affect more than one customer in the next few weeks for certain. I had at least 5 devs / different teams affected by this bug in one day. It's been a hot 🔥 issue for us. |
Already reinstalled a machine in an attempt to fix this. Eagerly waiting for a fix |
This is very frustrating. I'm trying to add :Rebuild and its not working. Perhaps this scenario should be added to some sort of test framework by the MSBuild team? I know it's no-one's fault, but these kinds of avoidable issues are a complete productivity killer |
@maxgolov Thanks for the workaround!
For c projects, the following works:
For c# projects, the following seems to help but I got other errors now (I'll write back as soon as I know more why):
We make extensive usage of I'm also pretty disappointed with dotnet/msbuild#6373 , eagerly waiting for a fix as well. |
So this is breaking builds for a lot of people. How about rolling back this breaking change until Visual Studio 16.10.1 Hotfix is released? |
As I mentioned above, there is no way to install non-latest version of Visual Studio on VM images. If you upgrade VS to the 16.10 on your local machine, you won't be able to downgrade it too. |
I'm very disappointed by your reaction. In a professional organisation one assumes there are procedures to revert changes when there are serious problems. I would argue breaking various people's builds would warrant such a roll-back. If you don't have a way to restore the previous version of Visual Studio (16.9), then there must be something seriously wrong with the procedures you have in place. |
We always try to rollback images in case of any issues and fix it on our side if it is possible. |
What about Installing an earlier release? There's an additional paragraph that applies here as well, emphasis mine:
So even the Microsoft Visual Studio Team advices against always upgrading to the latest minor version. |
This must be related to microsoft/azure-pipelines-tasks#14922. We use the target parameter in our DevOps pipeline. |
@maxgolov it seems like Visual Studio released 16.10.1 and it's available for download. |
@FrancescElies we've already started the new image deployment. It will be finished on Monday, but some customers may expect the new version earlier since the deployment is performed gradually. |
I can confirm the targets cli parameter is work on VSBuild 1.187.0. |
@FrancescElies could you please confirm that the issue is resolved with the new image version? |
@miketimofeev 👌 checking at the moment, I will close the issue as soon as I removed the workaround from our codebase and everything works fine. |
Closing. We removed the workaround and everything seems to be working fine. @maxim-lobanov @miketimofeev thanks for your support! |
Description
Starting from today on we are seeing jobs failing with Error MSB4057 where before we had no errors.
I have narrowed two builds for the same commit that present different behaviours.
Both throw Error MSB4057 but in different jobs.
Build 1
Build 2 (same commit as Build 1)
I guess this has to do with some sort of update on msbuild or the agents, maybe with Pre-release
win19/20210525.0?
Area for Triage:
Question, Bug, or Feature?:
Bug
Virtual environments affected
Image version
Expected behavior
No Error MSB4057 as it used to be.
Actual behavior
Error MSB4057 being thrown
Repro steps
See build links.
I am aware this links belong to a private repository and it makes little sense for me to make a a minimal reproducible example.
The text was updated successfully, but these errors were encountered: