Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"VsTsc" task could not be initialized with its input > parameters

Getting the below error on build Asp.NetCore project in Visual Studio Enterprise 2017 Version 15.6.0. The error goes sometimes if I restart visual studio. But I haven't got any proper solution.

Error MSB4064 The "ComputeOutputOnly" parameter is not supported by the "VsTsc" task. Verify the parameter exists on the task, and it is a settable public instance property. MyProject.Web.Public C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\build\Microsoft.TypeScript.targets 207 Error MSB4063 The "VsTsc" task could not be initialized with its input parameters. MyProject.Web.Public C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\build\Microsoft.TypeScript.targets 196

like image 240
vivek nuna Avatar asked Apr 01 '18 07:04

vivek nuna


3 Answers

There is a workaround for this issue since it is a known issue as mentioned above

  • Close all instances of VS2017.
  • Go to the C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.7\build folder using Windows Explorer.
  • Rename the TypeScript.Tasks.dll to TypeScript.Tasks.dll.27 and Microsoft.TypeScript.targets to Microsoft.TypeScript.targets.27.
  • Change 2.7 in the address bar to 2.4 to get to the equivalent folder for 2.4.
  • Copy TypeScript.Tasks.dll and Microsoft.TypeScript.targets from there, press back and paste them in the 2.7 folder. Note that these are only the "Tasks" DLL and the targets file but not the actual compiler. The DLL must match the targets file.

It applies to typescript version 2.6 as well.

Should work Like a charm.

like image 168
Sajeetharan Avatar answered Oct 23 '22 17:10

Sajeetharan


This problem seems to be resolved in Visual Studio 2017 v15.6.7 -- for me, this build error went away after upgrading.

like image 2
jaycer Avatar answered Oct 23 '22 17:10

jaycer


I got the same error on build/clean when running multiple instances of Visual Studio 15.9.3. Solved when closing all instances and just opened Visual Studio again.

The "ComputeOutputOnly" parameter is not supported by the "VsTsc" task. Verify the parameter exists on the task, and it is a settable public instance property

The "VsTsc" task could not be initialized with its input parameters.

However after starting and building a few times the following error occurred:

The "TypeScript.Tasks.GenerateOutputLogs" task could not be loaded from the assembly C:\Users\User\Documents\Projects\Project\packages\Microsoft.TypeScript.MSBuild.2.7.2\build\..\tools\net45\TypeScript.Tasks.dll. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Tried to solve it by upgrading to Visual Studio 15.9.6. This worked for a while but then the errors came back.

Finally solved by running Visual Studio as Administrator.

like image 2
Ogglas Avatar answered Oct 23 '22 17:10

Ogglas