The operation of the "CheckFileSystemCaseSensitive" task has encountered an unexpected failure. It was unable to load the file or assembly 'System.IO.FileSystem'

I recently upgraded my Visual Studio 2017 ASP.NET Core MVC web project by adding the Microsoft.TypeScript.MSBuild NuGet package v2.3.1 and updating my ASP.NET Core assemblies from 1.0.* to 1.1.1. However, after these changes, I encountered a new exception when building my project:

Severity    Code    Description Project File    Line    Suppression State
Error   MSB4018 The "CheckFileSystemCaseSensitive" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at TypeScript.Tasks.CheckFileSystemCaseSensitive.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

When I double-click on the exception message, it takes me to specific lines in the file Microsoft.TypeScript.targets where the error indicates that "MSBuildThisFileFullPath is not defined".

<Target Name="CheckFileSystemCaseSensitive">
    <CheckFileSystemCaseSensitive
       MSBuildThisFileFullPath="$(MSBuildThisFileFullPath)" >
      <Output TaskParameter="IsFileSystemCaseSensitive"  PropertyName="IsFileSystemCaseSensitive" />
    </CheckFileSystemCaseSensitive>
</Target>

I've attempted to resolve this issue by adding references to NETStandard.Library as suggested here, but unfortunately, that has not made any difference.

Here is an excerpt of the diagnostic MSBuild output related to this problem:

1>Target "CheckFileSystemCaseSensitive" in file "C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets":
1>  Using "CheckFileSystemCaseSensitive" task from assembly "C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\TypeScript.Tasks.dll".
1>  Task "CheckFileSystemCaseSensitive"
1>    Task Parameter:MSBuildThisFileFullPath=C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: The "CheckFileSystemCaseSensitive" task failed unexpectedly.
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018:    at TypeScript.Tasks.CheckFileSystemCaseSensitive.Execute()
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>    [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>  Done executing task "CheckFileSystemCaseSensitive" -- FAILED.

If anyone has any suggestions on how to resolve this issue, I would greatly appreciate your input. Thank you.

Answer ā„–2

(previous query, although outdated, could still be beneficial for others seeking a resolution to this particular problem):

For an alternative approach to configuring TypeScript within your Visual Studio project, consider incorporating the Microsoft TypeScript Compiler NuGet package into the solution instead of utilizing the Microsoft.TypeScript.MSBuild package. It may be necessary to adjust the <TypeScriptToolsVersion> setting in the .csproj file (only indicating the minor and major version):\n

<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>\n

Answer ā„–3

To get TypeScript 3.0 for Visual Studio 2017, simply download the TypeScript 3.0 SDK directly from the official TypeScript SDK download page.Click here to download

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

Guide to setting headers to application/json in Angular 2

I've been attempting to send an HTTP post request in Angular 2, but I'm facing difficulties setting the headers to content type application JSON. This is my current code: login(url, postdata) { var headers = new Headers({'Content-Type&a ...

Tips for removing the notification that the .ts file is included in the TypeScript compilation but not actively used

After updating angular to the latest version 9.0.0-next.4, I am encountering a warning message even though I am not using routing in my project. How can I get rid of this warning? A warning is being displayed in src/war/angular/src/app/app-routing.modul ...

Ways to specify the type signature for objects that incorporate a fresh method

My understanding is that in TypeScript, we use new() to structurally type a class constructor. But how do we type an object that includes a new method, for example: const k = { new() { return '123' } } ...

Error: Unrecognized action type in Vuex

I've been encountering some major issues with vuex lately. For some reason, getters, actions, and mutations are not being recognized. In the code snippet below, although fetchFacilities is working fine, addFacility is throwing an error: [vuex] unknown ...

Oops! Property 'month' cannot be set on undefined value due to a TypeError

Despite not receiving any errors from Visual Studio Code, Iā€™m encountering an error in Chrome's console. Below is the code snippet from my interfaces.ts file: export interface Data1{ month: string; employeeName: string; date: string; employmentSta ...

Displaying data from an Angular subscription in a user interface form

I am attempting to transfer these item details to a form, but I keep encountering undefined values for this.itemDetails.item1Qty, etc. My goal is to display them in the Form UI. this.wareHouseGroup = this.formBuilder.group({ id: this.formBuilder.contr ...

I have to make sure not to input any letters on my digipas device

There is a slight issue I am facing. Whenever I input a new transfer of 269 euros with the bank account number BE072750044-35066, a confirmation code is required. The code to be entered is 350269. https://i.stack.imgur.com/YVkPc.png The digits 350 corres ...

Spring Boot fails to recognize path variable data sent from Angular

When working with Angular 7, I encountered a situation where I needed to pass a value from the service class of Angular. Here is how I achieved it: executeHelloWorldBeanServiceWithPathVariable(name){ console.log("name coming from here"+name); retu ...

Can a form component be recycled through the use of inheritance?

Greetings to the Stackoverflow Community, As I delve into this question, I realize that examples on this topic are scarce. Before diving into specifics, let me outline my strategy. I currently have three pages with numerous FormGroups that overlap signif ...

Guide to displaying the value of a field in an object upon clicking the inline edit button using TypeScript

Is it possible to console log a specific attribute of an object when clicking on the edit button using the code below? Please provide guidance on how to utilize the index to access the value of "name". Refer to the last line in the code with the comment. ...

Guide on creating a Typescript function with a strongly typed argument

I am looking to develop a function that accepts a type created using export class and imported in the traditional manner as an extension of a particular type. With a base Page class and various derived classes, I aim to have this function capable of receiv ...

When null is assigned to a type in Typescript, it does not result in an error being triggered

Could someone enlighten me on why this code is not causing an error? import { Injectable } from '@angular/core'; interface Animal{ name: string; } @Injectable() export class AnimalService { lion: Animal = null; constructor() {} get(){ ...

Typescript's Integrated Compatibility of Types

One important concept I need to convey is that if one of these fields exists, then the other must also exist. When these two fields are peers within the same scope, it can be challenging to clearly communicate this connection. Consider the example of defi ...

Is OnPush Change Detection failing to detect state changes?

Curious about the issue with the OnPush change detection strategy not functioning properly in this demonstration. My understanding is that OnPush change detection should activate when a property reference changes. To ensure this, a new array must be set e ...

Combining Different Types of Errors

Can TypeScript's type system be exploited to provide additional information from a repository to a service in case of errors? I have a service that needs a port for a repository (Interface that the Repository must implement), but since the service mu ...

Why is NestJs having trouble resolving dependencies?

Recently delving into NestJs, I followed the configuration instructions outlined in https://docs.nestjs.com/techniques/database, but I am struggling to identify the issue within my code. Error: Nest cannot resolve dependencies of the AdminRepository ...

A programming element that is capable of accessing a data member, but mandates the use of a setter method for modifications

I am unsure whether I need a class or an interface, but my goal is to create an object with a member variable that can be easily accessed like a regular variable. For example: interface LineRange { begin: number; end: number; } However, I want th ...

TypeScript is still throwing an error even after verifying with the hasOwnProperty

There exists a type similar to the following: export type PathType = | LivingstoneSouthernWhiteFacedOwl | ArakGroundhog | HubsCampaigns | HubsCampaignsItemID | HubsAlgos | HubsAlgosItemID | TartuGecko | HammerfestPonies | TrapaniSnowLeop ...

Structure of document

Could anyone clarify for me the meaning of (callback[, thisObject]); that is mentioned in the TypeScript documentation here? I am particularly curious about the brackets themselves [, ]. ...

The Observable pipeline is typically void until it undergoes a series of refreshing actions

The issue with the observable$ | async; else loading; let x condition usually leads to staying in the loading state, and it requires multiple refreshes in the browser for the data to become visible. Below is the code snippet that I utilized: // TypeScript ...