-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Defining Build target in before.Solution.sln.targets causes hang, MSB0001 #5071
Comments
Hello, does it reproduce if you just have the solution file, no source files or projects? If so that would make it easy to reproduce here. Is it possible to share just the solution file- you can obfuscate the project names inside if you need to. |
Hi Dan, |
The solution file may be corrupted actually. Save a backup, then make a change in VS (eg add and remove a project) to force VS to write it out again. See whether that helps? |
Hi Dan, I have been through and worked out that it is the targets file that is causing the freeze/hang. |
Thanks, that's the repro then.
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
</Target>
</Project>
--> it hangs. Hit Ctrl-C and you get
|
The workaround is to not have targets with the default names like Build in a before targets file. |
Probably a regression from #4694. Thanks for the report! Unfortunately, I suspect that the reason the targets were defined there is as a workaround for the bug fixed by that PR, so there may not be an easy works-in-all-versions situation. Worst case, I'd define the stub targets in an import conditioned on |
Hi,
Sorry this is going to be vague, but I wanted to log it with you anyway.
Msbuild is hanging when I invoke directly on our solution. Works fine in 16.3.X, but hangs/fails on 16.4.X.
When pushing Ctrl+c to cancel the build I get the error at the bottom of the post.
Steps to reproduce
Unfortunately I cannot attach a sample as it is of our proprietary software.
Our solution is about 70 projects, with a mix of C#, C++ and C++/CLR.
I have included the import config from Visual Studio.
2019.vsconfig.txt
Environment data
Invoking MSBuild Directly:
The text was updated successfully, but these errors were encountered: