Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

When i am trying to Build my default JavaScript project(BlankApp Apache Cordova) in Visual Studio 2015 preview am getting following error.

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

Steps Taken in visual studio 2015 preview:

  1. File -> New -> Project -> Apache Cordova apps(under Javascript templates).

  2. Run the default project with Android Emulator.

Getting the following error.

Warning 2 The TypeScript Compiler was given no files for compilation, so it will skip compiling. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets 97 5 BlankCordovaApp4

like image 280
Gowtham Avatar asked Nov 15 '14 12:11

Gowtham


People also ask

Does TypeScript require compilation?

TypeScript provides a command-line utility tsc that compiles (transpiles) TypeScript files ( . ts ) into JavaScript. However, the tsc compiler (short for TypeScript compiler) needs a JSON configuration file to look for TypeScript files in the project and generate valid output files at a correct location.

Do we need to compile TypeScript files and why?

Typescript is a superset of javascript but it is a strongly typed, object-oriented programming language. Typescript file does not run directly on the browser as javascript run, we have to compile the typescript file to the javascript then it will work as usual.

What happens when TypeScript is compiled?

Then after compiling the TypeScript code file into the JavaScript code file, it actually reads and interprets the JavaScript code. After interpreting the JavaScript code, the compiler compiles that code which thereafter produces the result.


2 Answers

This is a known issue in the CTP3 release. It sounds like you've created a JS-based project, and have not added any TypeScript files, and so of course there are no .ts (aka TypeScript) files passed to the compiler. Ideally the compiler wouldn't be run at all, but the warning is harmless, and everything else should otherwise be working.

like image 116
dlev Avatar answered Sep 30 '22 01:09

dlev


You need to make sure that at least one of your TypeScript files is marked with the TypeScriptCompile build action.

If you click on the file and check the properties window in Visual Studio you will see the build action - it may be that they are all set to some other action.

like image 22
Fenton Avatar answered Sep 30 '22 03:09

Fenton