Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Evaluator FastPath items for common SDK use cases #10398

Closed
baronfel opened this issue Jul 17, 2024 · 2 comments · Fixed by #10409
Closed

Add missing Evaluator FastPath items for common SDK use cases #10398

baronfel opened this issue Jul 17, 2024 · 2 comments · Fixed by #10409
Assignees
Labels
Area: Engine Issues impacting the core execution of targets and tasks. performance
Milestone

Comments

@baronfel
Copy link
Member

baronfel commented Jul 17, 2024

The following members are invoked on a dotnet build and/or dotnet publish of the console and web templates and forced to fallback to the reflection-based lookups:

ReceiverType ObjectInstanceType MethodName
System.Version System.Version ToString(int)
System.Text.RegularExpressions.Regex Replace(String, String, String)
System.String System.String Equals(String)
System.IO.Path GetFileNameWithoutExtension(String)
System.Int32 System.Int32 ToString(String)
Microsoft.Build.Utilities.ToolLocationHelper GetPlatformSDKLocation(String, String)
Microsoft.Build.Utilities.ToolLocationHelper GetPlatformSDKDisplayName(String, String)
Microsoft.Build.Evaluation.IntrinsicFunctions NormalizeDirectory(String)
Microsoft.Build.Evaluation.IntrinsicFunctions IsOSPlatform(String)

We should add fastpaths for them and create a test in the SDK that uses the MSBuildLogPropertyFunctionsRequiringReflection=true mechanism to ensure we stay 'clean'.

@YuliiaKovalova
Copy link
Member

The cases for Microsoft.Build.Utilities.ToolLocationHelper can't be handled due to the need to add a reference to Microsoft.Build.Utilities.csproj from src/Build/Microsoft.Build.csproj
#10409 (review)

@rainersigwald
Copy link
Member

The cases for Microsoft.Build.Utilities.ToolLocationHelper can't be handled due to the need to add a reference to Microsoft.Build.Utilities.csproj from src/Build/Microsoft.Build.csproj

#10411; this is probably solvable but not trivially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Engine Issues impacting the core execution of targets and tasks. performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants