Skip to content

Remove hardcoded TFM in wasm build files #79109

@ViktorHofer

Description

@ViktorHofer

The WasmAppNative.targets file hardcodes the TFM in two places:

This makes reving the TFM i.e., from net7.0 to net8.0 harder. Also, this component is shipping to customers and should use by the SDK provided values instead.

<MicrosoftNetCoreAppRuntimePackDir Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == ''">%(ResolvedRuntimePack.PackageDirectory)</MicrosoftNetCoreAppRuntimePackDir>
uses the SDK provided ResolvedRuntimePack msbuild item. Even though that item itself doesn't offer a metadata that informs about the matching TFM, another item in the SDK should be available, i.e. KnownRuntimePack that includes the TargetFramework as metadata.

Noticed in #78354

cc @radical

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions