Skip to content

WebAssembly <NativeFileReference> isn't included in VS's fast up-to-date check #60862

@SteveSandersonMS

Description

@SteveSandersonMS

If you have, for example:

<NativeFileReference Include="somefile.a" />

... then you can call it via [DllImport("somefile")]. That's all great. But if you then do something to modify somefile.a, for example rebuild it from sources, then simply running Ctrl+F5 from VS again will not be enough to see your changes. That's because VS will consider the .NET project already up-to-date, assuming you didn't edit any .NET files. You have to artificially touch one of your .cs files (or similar) to make it rebuild.

How to fix it

See info at https://github.com/dotnet/project-system/blob/main/docs/up-to-date-check.md#up-to-date-check for how the MSBuild targets should tell VS about the native input/output files and include them in its up-to-date check.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions