I am receiving the following error across all typescript projects that I am trying run.
TS5042 Build: Option \'project\' cannot be mixed with source files on a
The tsc
command can be run in two ways:
project
parameter, which points to the directory that contains a tsconfig.json
. For example: tsc --project ./app
. The location of the tsconfig.json
determines the set of files that should be included in the compilation. See here for more about the tsconfig.json
: http://www.typescriptlang.org/docs/handbook/tsconfig-json.htmltsc MyFile1.ts MyFile2.ts MyFile3.ts
.These two options are incompatible with each other because they both attempt to define which files should be compiled.
What is the command you are using to compile your project? Or are you using an IDE that runs the build for you?
Here's the reference for the tsc compiler options.