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

Update InvokeTestingPlatformTask to prefer running Exe over dotnet exec dll #5094

Merged
merged 18 commits into from
Feb 24, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Feb 21, 2025

Manually verified this works as expected. For microsoft/PowerToys#37001, tests run successfully when running the Exe directly but not when using dotnet exec dll. I wasn't able to set up projects in a similar way as PowerToys to repro the issue and have a test. But I think it makes sense to run directly, and potentially even faster. We probably have enough tests to know if this change is problematic for a main stream scenario.

Comment on lines +360 to +370
UseAppHost="$(UseAppHost)"
IsExecutable="$(_IsExecutable)"
TargetDir="$(TargetDir)"
AssemblyName="$(AssemblyName)"
NativeExecutableExtension="$(_NativeExecutableExtension)"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@baronfel Could you please confirm if it's okay to use _NativeExecutableExtension and _IsExecutable? We want to avoid using things that may potentially break in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are set by the .NET SDK in props files and so should be available. They are _-prefixed properties, which means we don't like to encourage their direct use, but I don't think we make this data available in any other way at this time. cc @dsplaisted for heads-up that more folks are taking data dependencies on SDK-private members.

@Youssef1313
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Evangelink Evangelink merged commit 149076d into microsoft:main Feb 24, 2025
6 of 8 checks passed
@Youssef1313 Youssef1313 deleted the run-exe branch February 24, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants