Reputation: 4647
I am getting a Warning in the Error List of Visual Studio when building my TypeScript project.
The TypeScript Compiler was given an empty configurations string, which is unusual and suspicious.
Upvotes: 7
Views: 1990
Reputation: 15981
For some reason, the typescript properties mentioned in NYCDotNet's answer were entirely missing for my property group sections.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
blah
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
blah
</PropertyGroup>
Adding them as per NYCDotNet fixed it.
Note
Upvotes: 1
Reputation: 4647
This is caused when this line ...
<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" />
... precedes these PropertyGroup sections in the .csproj file.
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
</PropertyGroup>
Upvotes: 9