Skip to content

WasmEmitTypeScriptDefinitions makes builds non-incremental #124729

@jjonescz

Description

@jjonescz

Description

Enabling WasmEmitTypeScriptDefinitions (copying dotnet.d.ts to wwwroot) makes re-builds non-incremental.

Reproduction Steps

  1. Run dotnet new blazorwasm.
  2. Set <WasmEmitTypeScriptDefinitions>true</WasmEmitTypeScriptDefinitions> in the project file.
  3. (Add the dotnet.d.ts to .gitignore and ensure the repo is in clean state via git clean -fxd.)
  4. Run dotnet build -bl && dotnet build -question -bl:question.binlog.

Expected behavior

Suceeds.

Actual behavior

Fails with error Building target "_CopyOutOfDateSourceItemsToOutputDirectory" partially, because some output files are out of date with respect to their input files.

Regression?

No, WasmEmitTypeScriptDefinitions is a new feature (added in #120097).

Known Workarounds

Adding this to the project makes it work:

  <ItemGroup>
    <Content Remove="wwwroot\dotnet.d.ts" />
    <None Include="wwwroot\dotnet.d.ts" />
  </ItemGroup>

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions