5
votes

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

6
did you ever get to the bottom of this? I'm having same issue and I think I've tried every solution on StackOverflow! I'm sure this warning is a red herring and it's some kind of configuration issue, as when I add a blank .ts file the error goes away but my blank project still fails to build, I don't get any kind of error message... Any ideas? - user964769
Were you able to resolve this issue? - Eyad

6 Answers

4
votes

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.

2
votes

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.

2
votes
  • Option 1: Take Project offline, edit project, remove the following lines:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')"/>

and

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />

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

It seems that there is no type script file available to compile. add a blank type script file under script folder and then compile, it should work.

0
votes

This warning was driving me nuts 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 goes away. I'm assuming this prevents TypeScript from compiling normally, which is fine by me as I don't want it anyway.

<PropertyGroup>
  <CompileDependsOn>
    CompileTypeScript;  <--- delete this line
    $(CompileDependsOn);
  </CompileDependsOn>
-1
votes

I had the same issue.

Mine was due to missing system variable to nodejs. Check your visual studio output. If it is not recognizing “node” command, add system variable.

Computer->right click-> properties -> advanced system settings -> Environment Variable

Check “path” under user variables and system variables

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