Although the steps outlined above may not guarantee a solution to your issue, I discovered that even after following them diligently, I continued to encounter the same compiler error.
I attempted restarting my machine post the "uninstall and install" process, but unfortunately, it did not resolve the problem.
It was only when I realized that instead of utilizing the control panel, one should make use of the package manager (by Right Clicking on the solution and selecting "Manage Nuget packages for solution") that I found success.
To solve the issue, uninstall the TS package from the package manager for your project first, then proceed with installing the package again before rebuilding.
Link to image showing project settings