Skip to content

[SDK] Add test verifying no fast path evaluators are not needed by SDK #10406

Open
@JanKrivanek

Description

@JanKrivanek

Context

related #10398

MSBuild evaluator has so called 'fast path' for the property functions evaluation:

private bool TryExecuteWellKnownFunction(out object returnVal, object objectInstance, object[] args)

Not being on the fast path means a fallback to a reflection need which makes the call more expensive. We should make sure that for common usage patterns (creating/building/publishing new console/web app) do not need any property functions that are not on the 'fast path'

Goal

Integration test(s) in dotnet/sdk repo (we need it there to catch the regressions early on) that turns on MSBuildLogPropertyFunctionsRequiringReflection=true and verifies that no functions are being required.
We should be able to use DotnetNewCommand and DotnetBuildCommand to auther the test(s). Inspiration:

https://github.com/dotnet/sdk/blob/18985b172e4ed14fa4bb5c2056eae9c65bdac538/test/dotnet-new.Tests/WebProjectsTests.cs#L36-L67

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions