Skip to content

Handle the case where projects input isn't set for test command in MTP mode #21041

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

Closed
wants to merge 1 commit into from

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented May 21, 2025

Context

When projects input isn't provided by the user, the task currently fails with:

##[error]Project file '' has an unrecognized extension.


Task Name

DotNetCoreCLI


Description

Handle the case when no projects is provided, which should test the whole solution.


Risk Assessment (Low / Medium / High)

Low: MTP support in DotNetCoreCLI is fairly new, and requires dotnet.config which is supported starting with .NET 10 SDK that is currently still in preview.


Unit Tests Added or Updated (Yes / No)

No


Additional Testing Performed

List all other tests performed (manual or automated, including integration, regression, scenario tests, etc.).


Documentation Changes Required (Yes / No)

Indicate whether related documentation needs to be updated.


Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

@Youssef1313
Copy link
Member Author

IIRC, PRs from forks will always fail.

@tarunramsinghani @merlynomsft @AdityaMankal-MS Can you take over this bug fix please?

@Youssef1313
Copy link
Member Author

@tarunramsinghani
Copy link
Contributor

/azp run

@Youssef1313
Copy link
Member Author

@tarunramsinghani

##[error]PRs from fork repositories forbidden. Create PR directly.

@@ -188,7 +188,7 @@ export class dotNetExe {
const dotnet = tl.tool(dotnetPath);
dotnet.arg(this.command);

if (isMTP) {
if (isMTP && projectFile.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Youssef1313, wanted to understand in which conditions the projectfile can be emptpy string ?

Also can you please fill in the full PR template for the change please.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tarunramsinghani Simply if the user didn't provide projects input, as mentioned in PR title.

@tarunramsinghani
Copy link
Contributor

Closing this in favor for #21072 from local branch.

@Youssef1313 Youssef1313 deleted the patch-1 branch June 9, 2025 12:31
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.

2 participants