The TypeScript compiler was not provided with files to compile, so it will skip compilation

When I try to create my default JavaScript project (BlankApp Apache Cordova) in Visual Studio 2015, you will receive the following error.

The TypeScript compiler was not provided with files to compile, so it will skip compilation.

Steps taken in visual studio 2015 preview:

  • File -> New -> Project -> Apache Cordova Applications (under Javascript Templates).

  • Run the default project with an Android emulator.

Getting the next error.

Warning 2 The TypeScript compiler was not provided with files to compile, so it will skip compilation. C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v12.0 \ TypeScript \ Microsoft.TypeScript.targets 97 5 BlankCordovaApp4

+5
source share
6 answers

This is a known issue in the release of CTP3. It looks like you created a project based on JS and did not add any TypeScript files, and, of course, files transferred to the compiler are not transferred .ts (aka TypeScript). Ideally, the compiler does not start at all, but the warning is harmless, and everything else should work.

+4
source

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

If you click on a file and check the properties window in Visual Studio, you will see the assembly action - perhaps all of them are configured for some other action.

+2
source

It seems that there is no script type file available for compilation. add an empty script file to the script folder and then compile it, it should work.

+1
source

This warning infuriated me with ASP.NET 5 (asp.net core 1). If you double-click the warning, you open the Microsoft.TypeScript.targets file. Delete the line with CompileTypeScript and the warning disappears. I suppose this prevents TypeScript from compiling in the usual way, which is great for me since I don't want this anyway.

 <PropertyGroup> <CompileDependsOn> CompileTypeScript; <--- delete this line $(CompileDependsOn); </CompileDependsOn> 
0
source
  • Option 1: Take the project offline, edit the project, delete the following lines:

<Import Project = "$ (MSBuildExtensionsPath32) \ Microsoft \ VisualStudio \ V $ (VisualStudioVersion) \ TypeScript \ Microsoft.TypeScript.Default.props" State = "EXISTS ('$ (MSBuildExtensionsPath32) \ Microsoft \ VisualStudio \ V $ (VisualStudioVersion) \ TypeScript \ Microsoft.TypeScript.Default.props') "/">

and

<Import Project = "$ (MSBuildExtensionsPath32) \ Microsoft \ VisualStudio \ V $ (VisualStudioVersion) \ TypeScript \ Microsoft.TypeScript.targets" State = "EXISTS ('$ (MSBuildExtensionsPath32) \ Microsoft \ VisualStudio \ V $ (VisualStudioVersion) \ TypeScript \ Microsoft.TypeScript.targets') "/">

  • Option 2: Change "AddTypeScriptReferencePath": true to false in Webessentials-Settings.json
0
source

I had the same problem.

Mine was due to the lack of a nodejs system variable. Check the results of your visual studio. If it does not recognize the "node" command, add a system variable.

Computer-> right click-> properties β†’ advanced system settings β†’ environment variable

Check the "path" under user variables and system variables

Add the nodejs path to it. That is: C: \ Program Files (x86) \ nodejs

-1
source

Source: https://habr.com/ru/post/1206940/


All Articles