Skip to content

Remove hardcoding of TFMs in wasm tests #123155

@ericstj

Description

@ericstj

One case was discussed here #123100 (comment)

This could be removed by ensuring that props in the SDK define the path of the tasks, and those props get imported by the test-generated project. This TFM in the path to the folder containing tasks is completely unnecessary coupling to the framework version. The product itself only ever cares about two frameworks and only selects between those two.

<_TasksDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tasks\${NetCoreAppToolCurrent}\</_TasksDir>
<_TasksDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tasks\${NetFrameworkToolCurrent}\</_TasksDir>

There is probably more hardcoding that can be removed. If necessary we could have a source-generator flow MSBuild properties into the test sources, but ideally we can just make the tests do things that users would (or closer to what users would) and not need to "know" too much about the shape of the product's internal paths.

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-WorkloadsWorkloads like wasm-tools

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions