-
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
System.MissingMethodException in MSBuild bundled with VS2019 #4286
Comments
Can you please download and run https://github.com/Microsoft/msbuild/blob/master/scripts/EnumerateMSBuild.ps1 and post the results? I suspect you have an old version of MSBuild installed in your GAC. |
Thank you, that shows the problem. You have MSBuild assemblies in your Global Assembly Cache, which they're not designed for. You can run these commands from an elevated Developer Command Prompt to remove them:
After that, VS 2017 and VS 2019 will be able to each have their own copy of MSBuild and they won't interfere with one another. |
Thanks, it helped! Something must gone wrong during VS2019 install or VS2017 uninstall. |
Fresh install of VS2019 preview 5 and I had same problem. |
I agree. Unfortunately, the current VS setup process doesn't make this easy to do. We'll sync with the Setup team again to see if our options have improved there. |
I am using the latest Rider version (2019.3 EAP 4; At the time of this comment) and have not been able to utilize WinForms at all since I removed VS2019 for being too broken on my system months ago. Since then I have had no space to even reconsider VS2019 as the SSD I am working with is far too small (Yes I have been considering a newer SSD, one with more space... sosumi) Currently I can only do Console Applications, nothing requiring even a spec of GUI libraries. So far, I have had no luck in using the latest version of MSBuild other than through the Dotnet SDK 2.2.202 which I assume now is not the latest version anymore, however it does not build GUIs. I had installed MSBuild separately which installed it into the VS2019 folder on my workstation, however I get the following error: https://gist.github.com/Blizzardo1/55a73801b733d5b7a12dafc0e553a9c7 By googling it had lead me here and thus I ran the EnumerateMSBuild script which got me the following output: https://gist.github.com/Blizzardo1/5d97e68fe7119394d696c90d73b4f8c0 Please let me know what I can do to finally fix this 6 month issue once and for all. Thank you. EDIT: Looking at one of the suggestions above to use gacutil (me not having it installed as I do not have VisualStudio 2019 installed), I had taken the Microsoft.NET list portion of my msbuild_version (Which I backed up the entire folder for safety reasons), converted it into a CSV, loaded into a powershell session, and began to remove anything 12 or later from the folder, only to leave anything less than 12, for compatibility I guess or something like such. From there, I restarted Rider, and .... it works! WinForms all the way just like the Double Rainbow. |
On fresh installation of VS2019, when trying to build project from VS Console, I'm getting following error on every solution:
When trying to open solution directly from VS, projects are failing to load, and MSBuild just crashes.
There is also ongoing discussion about this here:
https://developercommunity.visualstudio.com/content/problem/500131/0-projects-in-solution-explorer-in-visual-studio-2.html
The text was updated successfully, but these errors were encountered: