The "VsTsc" operation was unable to start due to issues with its provided input parameters

Encountering the following error when building an Asp.NetCore project in Visual Studio Enterprise 2017 Version 15.6.0. The error sometimes disappears upon restarting Visual Studio, but a permanent solution has not been found.

Error MSB4064: The "ComputeOutputOnly" parameter is not supported by the "VsTsc" task. Please verify that the parameter exists on the task, and 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

Answer №1

If you're facing this issue, don't worry - there's a solution available. This issue is a known problem, as mentioned earlier.

  • First, make sure to close all instances of VS2017.
  • Next, navigate to the C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.7\build folder using Windows Explorer.
  • Within that folder, rename TypeScript.Tasks.dll to TypeScript.Tasks.dll.27 and Microsoft.TypeScript.targets to Microsoft.TypeScript.targets.27.
  • Change the address bar from 2.7 to 2.4 to access the equivalent folder for version 2.4.
  • Now, copy the TypeScript.Tasks.dll and Microsoft.TypeScript.targets files from the 2.4 folder, then navigate back to the 2.7 folder to paste them. Remember, the DLL must correspond with the targets file.

These steps also apply to TypeScript version 2.6.

Follow these instructions, and everything should work smoothly.

Answer №2

For those encountering this issue in 2020 while using Visual Studio 2019, follow these steps to resolve it. Begin by restoring your NuGet packages, but before doing so, clear your global repository:

Close Visual Studio and then open PowerShell:

dotnet nuget locals global-packages --clear

Next, either delete or rename the packages folder within your project directory. Once completed, restart Visual Studio and perform a NuGet Restore as usual.

For more detailed information, refer to https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore

Answer №3

Encountered the same issue during build/clean while running multiple instances of Visual Studio 15.9.3. Resolved the problem by closing all instances and reopening Visual Studio.

Received an error stating that the "ComputeOutputOnly" parameter is not supported by the "VsTsc" task. Checked if the parameter exists and is a settable public instance property.

Additionally, faced an issue where the "VsTsc" task could not be initialized with its input parameters.

However, later on, encountered another error after starting and building a few times:

Received an error that the "TypeScript.Tasks.GenerateOutputLogs" task could not be loaded from the assembly path. Checked the declaration, availability of the assembly and its dependencies, and ensured that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Attempted to resolve by upgrading to Visual Studio 15.9.6, which temporarily fixed the issue but the errors resurfaced later on.

Finally, successfully resolved the issue by running Visual Studio as Administrator.

Answer №4

The issue appears to have been fixed in the latest version of Visual Studio 2017, namely v15.6.7. I can confirm that the build error disappeared for me after updating to this version.

Answer №5

If you're facing an issue with TypeScript, you can check out the open problem on GitHub at this link: https://github.com/Microsoft/TypeScript/issues/22422. A potential workaround has been shared by Manish3177, but it's always a good idea to test it yourself to confirm its effectiveness.

UPDATE: After testing the workaround, I can confirm that it worked for me. Manish3177 has provided detailed insights into the root cause of the issue. The workaround involves making modifications to the Microsoft SDKs by moving v.2.4 task files to the v.2.7 directory. Let's hope that the Typescript team will release an official fix for this issue soon.

Answer №6

Resolved the issue by updating the following `nuget packages in the current project.

TypeScript.MSBuildTask, Microsoft.TypeScript.Compiler and

Microsoft.TypeScript.MSBuild

Source

Answer №7

Previously, my Visual Studio 2015 was running TypeScript 2.6. Upon uninstalling it and updating to version 2.9.2 (the most recent version at the time), the problem was resolved successfully.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

AngularTS - Using $apply stops the controller from initializing

Every time I launch the application, the angular {{ }} tags remain visible. Removing $scope.$apply eliminates the braces and displays the correct value. I am utilizing Angular with Typescript. Controller: module Application.Controllers { export class Te ...

React is running smoothly, however, when attempting to call the React flow, an error is encountered: "Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not

Recently, I set up a React application using Next.js and TypeScript. Initially, everything was running smoothly with the command npm run dev. However, upon integrating the react flow library with npm install reactflow, I encountered an error when trying to ...

Currently in the process of creating a carousel displaying images, I have encountered an issue stating: "An optional property access cannot be on the left-hand side of an assignment expression."

I am currently working on an Angular Image Carousel that utilizes a model to iterate through the images. However, I am encountering an error when attempting to access the first position. An error message stating "The left-hand side of an assignment expres ...

Leveraging event listeners in conjunction with React's useEffect function

Check out the code example on Code Sandbox here Hey there, I'm trying to implement a feature where clicking a button inside a container displays a box. I've set up an event listener so that when you move your mouse outside the container, the box ...

"Regardless of the circumstances, the ionic/angular service.subscribe event

Currently, while developing the login section of my Ionic app, I am encountering an issue with the getTokenAsObservable.subscribe() function. The main problem is that the function checks the token status when it is saved (by clicking the Login button) or ...

Custom Email Template for Inviting Msgraph Users

I'm currently exploring the possibility of creating an email template for the MS Graph API. I am inviting users to join my Azure platform, but the default email they receive is not very visually appealing. public async sendUserInvite(body: {email: < ...

Using Selenium with C# to find elements within a chart

I am trying to locate and interact with the stimulusFrequency circles on this chart so that I can click and drag them. <svg class="svg-graph-content graphEventHandler ng-valid" ng-model="hearingGraph" viewBox="0 0 470 355" preserveAspectRatio="none"> ...

Implementing the 'keepAlive' feature in Axios with NodeJS

I've scoured through numerous sources of documentation, Stack Overflow threads, and various blog posts but I'm still unable to make the 'keepAlive' functionality work. What could I be overlooking? Here's my server setup: import ex ...

What is the equivalent of html script tags in Webpack 2?

I recently downloaded a new npm module that suggests including the following code in my project: <link href="node_modules/ng2-toastr/bundles/ng2-toastr.min.css" rel="stylesheet" /> <script src="node_modules/ng2-toastr/bundles/ng2-toastr.min.js"&g ...

Data loss occurs when the function malfunctions

Currently, I am working with Angular version 11. In my project, I am utilizing a function from a service to fetch data from an API and display it in a table that I created using the ng generate @angular/material:table command. Client Model export interfac ...

Filtering server-side components in Next.js to create a customized list

Having been accustomed to the previous architecture of Next.js, I embarked on a new project where I am exploring the use of server and client components in the latest architecture. Specifically, I have a page dedicated to displaying race results in a tabl ...

Prevent Animation on Back Button in Xamarin.Forms Shell

Currently working on an app where I am looking to eliminate animations when navigating in Shell for Popping and Pushing. I have successfully disabled animations for Push Pages by setting the function to "False," but changing the Back Button functionality ...

What is the best way to showcase a byte array as an image within my database?

One of the actions in my project involves uploading a file, which is then saved as a byte array in the database. [HttpPost] public async Task<IActionResult> Upload(ImageViewModel model) { byte[] data = null; using (var ms = new MemoryStream() ...

What's the reason behind needing a cast when using Array.Clone() in C#?

The documentation from Microsoft explains that the Array.Clone() method in C# returns an object type: public object Clone (); Interestingly, the provided example includes a cast for proper usage. For instance: int[] myClone1 = (new int[ ...

TypeScript Error: The Object prototype must be an Object or null, it cannot be undefined

Just recently, I delved into TypeScript and attempted to convert a JavaScript code to TypeScript while incorporating more object-oriented features. However, I encountered an issue when trying to execute it with cmd using the ns-node command. private usern ...

Issue with Linq to Sql

I am facing a challenge with connecting two tables, Users and Queries, through a foreign key (UserId) in the Queries table. My goal is to add queries that have been added by a specific user named "Bob" to all users. Below is the code snippet I am currentl ...

A guide to merging two JSON objects into a single array

Contains two different JSON files - one regarding the English Premier League stats for 2015-16 season and the other for 2016-17. Here is a snippet of the data from each file: { "name": "English Premier League 2015/16", "rounds": [ { "name": ...

How can I implement a recursive nested template call in Angular 2?

Hopefully the title isn't too misleading, but here's my dilemma: I am in the process of building an Angular 2 app and utilizing nested templates in multiple instances. The problem I am facing involves "widgets" within my app that can contain oth ...

Unable to utilize material tabs in this situation

Discovering the material tabs feature at https://material.angular.io/components/tabs/api#MatTab got me excited to implement it in my project. After adding the suggested import, I encountered an issue where I couldn't find the module "@angular/materia ...

The execution time of Node's Promises.all() function is unreasonably slow

I need to add a table containing data on sent emails after each email has been successfully sent. Within a loop, I am populating an array to be resolved using the Promise.all(). insertData is a function that adds data, requiring two parameters: connector, ...