從VisualStudio
2017 升級安裝 VisualStudio 2019 時,常常在執行舊有或者建位新專案時會出現下面的訊息:
「The tools version
"15.0" is unrecognized. Available tools versions are
"14.0", "2.0", "3.5", "4.0"」
這是因為在安裝時MsBuild相關的dll 會仍然有舊有的15.1版本的dllGAC。
所以解決的方式是以管理員身份執行Visual Studio Developer Command下指令去移除舊有的Dll版本,如下圖:
執行以下命令來移除Microsoft.Build.*.dll
15.1版本:
gacutil.exe /u
"Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
gacutil.exe /u
"Microsoft.Build, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
gacutil.exe /u
"Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
gacutil.exe /u
"Microsoft.Build.Engine, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
gacutil.exe /u
"Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
沒有留言:
張貼留言