ManagedToNativeGenerator is invoked on every build
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Description
ManagedToNativeGenerator in WasmApp.Common.targets is called too often, even if no source code changed.
this results a) in a time loss when building or hitting F5 in VS and
b) in my case lots of unnecessary warnings obscuring actual warnings:
### Reproduction Steps
create a blazor wasm project
run `dotnet build -bl`
run `dotnet build -bl` a second time without modifying files in between runs
, inspect the binlog
, observe that ManagedToNativeGenerator is there, eating up time unnecessarily
here's my .csproj:
>
SAK
SAK
SAK
SAK
$(CODie__DotNetVersion)
true
Default
service-worker-assets.js
### Expected behavior
this should only run when something has actually changed in the inputs
### Actual behavior
it runs on every build
### Regression?
_No response_
### Known Workarounds
_No response_
### Configuration
.net 10.0.0.101
windows 11 pro 25h2 26200.7462
VS 2026 18.1.0
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.