Devenv always rebuilds my project because typescript file is newer than pdb file

I have a project with scripts. devenv is constantly rebuilding this project. The diagnostic output contains the following line:

Project 'Benefits' is not up to date. Input file 'C:\abc\UI\BenefitsWeb\Scripts\Benefits\Modules\PPACA\ApprovalScreen.ts' is modified after output file 'C:\abc\UI\BenefitsWeb\bin\Dayforce.Web.Benefits.pdb'.

So how do I solve this problem? The above typescript file is indeed newer than PDB. But PDB is not the result of typescript compilation !!!

This is how I compile typescript files:

<PropertyGroup>
  <CompileDependsOn>
    $(CompileDependsOn);
    CompileTypeScript
  </CompileDependsOn>
</PropertyGroup>

<Target Name="GetInputs">
  ...
</Target>

<Target Name="GetOutputs">
  ...
</Target>

<Target Name="CompileTypeScript" DependsOnTargets="GetInputs;GetOutputs" Inputs="@(InputTypeScripts)" Outputs="@(OutputJavaScripts)">
  ...
</Target>

A project defines typescript files in a group of elements TypeScriptCompile, for example:

<TypeScriptCompile Include="Scripts\Benefits\Modules\PPACA\CalendarSetup.ts" />

Of course, @(OutputJavaScripts)lists only the expected files .js. No PDB files.

So, how did it happen that devenv matches the typescript file with the PDB file? How to fix it?

EDIT 1

. typescript # (, typescript, ). , typescript , PDB, , PDB . javascript - . , !

+2
2

, txt typescript. csproj, , , , . , . MSBuild , .

0

js. Build Action None, , Content, .

0

Source: https://habr.com/ru/post/1617061/


All Articles