VS 2019 update to 16.8.4 broke every single one of my solutions

Viewed 527

I don't recall the previous version I had (it could have been 16.8.1), but updating just now to 16.8.4 results in none of my solution projects being able to load. Here's the output window for one of my solutions:

F:\Users\username\Documents\Visual Studio Projects\FitnessManagerCore\FitnessManagerCore\FitnessManagerCore.csproj : error  : The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" is correct, and that the file exists on disk.  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.CSharp.CurrentVersion.targets

F:\Users\username\Documents\Visual Studio Projects\GeneralUtilities\GeneralUtilities\GeneralUtilities.csproj : error  : The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" is correct, and that the file exists on disk.  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.CSharp.CurrentVersion.targets

F:\Users\username\Documents\Visual Studio Projects\FitnessManagerCore\FitnessManagerConsole\FitnessManagerConsole.csproj : error  : The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" is correct, and that the file exists on disk.  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.CSharp.CurrentVersion.targets

VS advised to try to reload the projects manually. When I attempt this, I get the following error message:

enter image description here

It seems Microsoft has no means to roll back a previous installation. I do not have a restore point. I do not want to uninstall/reinstall.

Edit:

I just tried creating a new solution to see what would happen if I tried to load one of my existing projects. When creating a console app w/ .NET Core, I get this:

enter image description here

Update:

This latest VS 2019 simply does not want to work on my machine in any capacity. I uninstalled VS 2019, rebooted, and attempted to reinstall. The installation stops midway with the below error message. When I click "Report this problem", it opens a Microsoft web page to report the issue, but says "Disconnected from Visual Studio". Since I can't roll back to a previous version according to what I'm reading, I guess I just can't use VS 2019 anymore.

enter image description here

1 Answers

You could check in your csporj file if you have:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

You would need to change MSBuildToolsPath to MSBuildBinPath, like this:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

When you create a project in Visual Studio 2008, $(MSBuildToolsPath) is added by default to your csproj file as the path to Microsoft.Build.Engine v3.5. Be sure to change it to $(MSBuildBinPath) which is the path to Microsoft.Build.Engine v2.0.

(more info here)

Related