Hi,
Version: Visual Studio 2015 RC/TS 1.5 beta.
I have a repro for this.
Error:
------ Rebuild All started: Project: foo, Configuration: Debug Any CPU ------
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(126,5): error MSB6006: "tsc.exe" exited with code 1.
Done building project "foo.njsproj" -- FAILED.
The compiler should have reported a no-implicit-any error, but fails instead. The error can be fixed with:
export var foo = () => ({
moduleFooter: <any>undefined,
});
Simplified:
var foo = () => ({ moduleFooter: undefined }); // no error
var foo2 = () => { return ({ moduleFooter: undefined }) }; // error
If both vars use the same name then you get a noImplicitAny error on both lines.
@danquirk, not sure that I comprehend the simplification. This is actually a compiler crash situation and I would have thought the uploaded project is necessary in order to reproduce the error MSB6006: "tsc.exe" exited with code 1.
There's no crash in the latest bits from master so I presume whatever the cause was there has been fixed.
There is no crash. the error is actually generated but never reported. since you have --noEmitOnError later on the return code is 1 as an error was observed, yet the error message is not reported.
The core issue here is we report noImplicitAny errors when we widen. if we are not widening we do not get them. we are currently not widening the return type of the lambda without a body. so we miss the error.
The error is later on reported in bar.ts, when the value is used. but by then we have written all the errors in foo.ts, and we skip emitting the error.
Until a workaround is available:
The easiest way to find out the actual problem is to enable detailed compiler output in Visual Studio -> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity. After changing this to Detailed it was easy to search for tsc.exe in the build output window and find the underlying error of the call to tsc.exe.
None of workarounds are working here.... I dont how its working for others..
My project Asp.net(.Net Framework) and this is my tsconfig
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": false,
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
],
"types": [
"core-js"
]
}
}
I did all options which are available in the github.. Please do your help here
@SekThang this issue was fixed over a year and half ago. Please file a new issue and share some context to allow us to diagnose the issue.
if relocate or rename *.ts files go to tsconfig and change path
Most helpful comment
Until a workaround is available:
The easiest way to find out the actual problem is to enable detailed compiler output in
Visual Studio -> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity. After changing this toDetailedit was easy to search fortsc.exein the build output window and find the underlying error of the call totsc.exe.