今天工作中遇到了VS生成MaterialDesign項目代碼時,VS提示
.NetCore3.1 Build error in azure function project, Metadata generation failed. Exit code -2147450743 Error, Failed to initialize CoreCLR HRESULT: 0x80070057
VS報錯圖片如下。
解決方案
鏈接地址:
https://developercommunity.visualstudio.com/content/problem/953931/netcore31-build-error-in-azure-function-project-me.html
解決的方法:
I found the issue, it was because the "The Program worked in earlier versions of Windows but won't install or run now" option was set. This check box is in Program Compatibility Troubleshooter of devenv.exe in \Microsoft Visual Studio\2019\Professional\Common7\IDE folder.
大概意思就是你在VS的devenv.exe(VS運行程序。桌面快捷方式,打開所在文件夾就可找到),疑難解答中勾選了在舊版本下面圖片的選項,取消勾選保存設置就能解決問題。