Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Typescript support from Visual Studio project?

Tags:

Adding TypeScript support in latest version of VS is easy - just add a TypeScript file and VS will automatically will reconfigure the project.

However when all TS files are gone it spits out this warning:

Warning: The TypeScript Compiler was given no files for compilation, so it will skip compiling. 

It is possible to manually remove TypeScript support by editing the project file in notepad, but is there a GUI in VS that handles this?

like image 348
Mike Trusov Avatar asked May 15 '14 22:05

Mike Trusov


People also ask

How do I disable TypeScript?

To disable a TypeScript rule for a specific line, we can use the @ts-ignore comment. to add the // @ts-ignore: Unreachable code error comment so that the TypeScript compiler ignores the unreachable code error in the line after the comment.

Does Visual Studio support TypeScript?

TypeScript supportBy default, Visual Studio 2022 provides language support for JavaScript and TypeScript files to power IntelliSense without any specific project configuration. For compiling TypeScript, Visual Studio gives you the flexibility to choose which version of TypeScript to use on a per-project basis.


1 Answers

I removed TypeScript by hand.

  1. Right-click on the Web-project file in the Solution Explorer and choose Unload project
  2. Right-click again on the project file, and now choose Edit {project-name}.csproj
  3. Remove all elements with the name TypeScript in it, and save the XML file
  4. Right-click the project file, and choose Reload project

Always keep a backup of the project file, as you may wreck it. Your millage may vary...

like image 69
doekman Avatar answered Oct 13 '22 15:10

doekman