Skip to content

Make MSBuild extension more strict#7525

Open
Youssef1313 wants to merge 6 commits intomainfrom
dev/ygerges/stricter-msbuild
Open

Make MSBuild extension more strict#7525
Youssef1313 wants to merge 6 commits intomainfrom
dev/ygerges/stricter-msbuild

Conversation

@Youssef1313
Copy link
Member

Fixes #6954

Copilot AI review requested due to automatic review settings March 11, 2026 13:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Tightens the Microsoft.Testing.Platform MSBuild task behavior so a “successful” invocation that never actually communicated with the test application (no module info / no run summary) is treated as a failure, addressing silent no-test-run scenarios in dotnet test/VSTest mode (Fixes #6954).

Changes:

  • Track whether a RunSummaryInfoRequest was received and fail the task if not.
  • Fail the task when no ModuleInfoRequest was received despite a successful tool exit.
  • Add new localized resource strings for the new failure messages.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform.MSBuild/Tasks/InvokeTestingPlatformTask.cs Adds stricter post-run validation (module info + run summary must be received) before reporting success.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/MSBuildResources.resx Adds new resource strings for missing module info / missing run summary failures.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.cs.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.de.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.es.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.fr.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.it.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.ja.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.ko.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.pl.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.pt-BR.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.ru.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.tr.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.zh-Hans.xlf Localization entries for new resource strings.
src/Platform/Microsoft.Testing.Platform.MSBuild/Resources/xlf/MSBuildResources.zh-Hant.xlf Localization entries for new resource strings.

Copilot AI review requested due to automatic review settings March 11, 2026 13:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

@Youssef1313
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Youssef1313
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Youssef1313 Youssef1313 force-pushed the dev/ygerges/stricter-msbuild branch from f890cac to c601e32 Compare March 11, 2026 17:14
Comment on lines +390 to +399
if (_moduleInfo is null)
{
Log.LogError(Resources.MSBuildResources.DidNotReceiveModuleInfo, TargetPath.ItemSpec.Trim());
return false;
}
else if (!_receivedRunSummaryInfoRequest)
{
Log.LogError(Resources.MSBuildResources.DidNotReceiveRunSummaryInfo, TargetPath.ItemSpec.Trim());
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this adding potentially confusing messages if the return value is false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why do you think it's confusing messages?

…eting/Microsoft.Testing.Platform.MSBuild.VSTest.targets
Copilot AI review requested due to automatic review settings March 12, 2026 12:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review. Take the survey.

…stingPlatformTask.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 12, 2026 12:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 12, 2026 12:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


You can also share your feedback on Copilot code review. Take the survey.

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.

Incompletely configured MTP in dotnet test VSTest *silently* doesn't run tests

3 participants