TypeScript Compiler被赋予一个空配置字符串

NYC*_*Net 7 visual-studio typescript

在构建我的TypeScript项目时,我在Visual Studio的错误列表中收到警告.

The TypeScript Compiler was given an empty configurations string, which is unusual and suspicious.
Run Code Online (Sandbox Code Playgroud)

NYC*_*Net 9

这是因为这条线...

<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" />
Run Code Online (Sandbox Code Playgroud)

...在.csproj文件中的这些PropertyGroup部分之前.

<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>
Run Code Online (Sandbox Code Playgroud)