Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A numeric comparison was attempted on "$(lastknowntypescriptversion) that evaluates to "" instead of a number

I have a proejct in Visual Studio 2015 and I installed Typescript 1.8.11. My project is failing to build with the error "A numeric comparison was attempted on "$(lastknowntypescriptversion) that evaluates to "" instead of a number". How do I resolve this?

like image 337
Erica Stockwell-Alpert Avatar asked Feb 16 '18 15:02

Erica Stockwell-Alpert


1 Answers

This error happened when opening a solution with an old web project trying VS 2022 preview (with .NET Web Development and C++ workloads)... From Microsoft Docs Walkthrough:

If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2019 and later, it's installed under the Visual Studio installation folder.

To install MSBuild on a system that doesn't have Visual Studio, go to Visual Studio downloads and scroll down to All Downloads, then expand Tools for Visual Studio 2019. Install Build Tools for Visual Studio 2019, which includes MSBuild, or install the .NET Core SDK.

So from https://dotnet.microsoft.com/download I installed the .Net Core v3.1 SDK (includes the runtime), since VS 2022 installed v5. However, even with restarts, nothing seemed to work. The solution I found was:

  • installing Visual Studio 2019 with the same workloads

Now even just opening the solution in VS 2022, the web project loads properly.

like image 154
CPHPython Avatar answered Oct 11 '22 19:10

CPHPython