-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[dotnet test for MTP] Throw exception if the project doesn't produce executable #48065
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the behavior of dotnet test for Microsoft.Testing.Platform projects by explicitly throwing an exception when a test project doesn’t produce an executable rather than attempting a fallback execution method.
- Replaces the fallback to dotnet run with an exception throw in TestApplication.cs.
- Removes the BuildArgsWithDotnetRun method from TestApplication.cs and related constants from CliConstants.cs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Cli/dotnet/Commands/Test/TestApplication.cs | Replaced fallback dotnet run execution with a clear exception for non-executable test projects and removed the redundant BuildArgsWithDotnetRun method. |
src/Cli/dotnet/Commands/Test/CliConstants.cs | Removed constants that were used in the fallback execution logic, aligning with the new exception-based behavior. |
Co-authored-by: Copilot <[email protected]>
Build is green but is old. Kicking a new build. |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
I don't think this should happen, or is a case we should support. So I think better to explicitly throw exception for now, and iterate later if there are user reports indicating valid use cases. But so far I can't see any valid use case.