Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 24, 2025

Summary

After thorough analysis of issue #36830, I found that the reported problem has already been resolved in the current codebase. The issue described a non-functional -d option for dotnet tool install --create-manifest-if-needed that was supposed to show diagnostic information about manifest search paths.

Findings

1. No -d option exists for tool install

The dotnet tool install command does not implement any -d option for manifest diagnostics. Only the global -d option exists for general dotnet diagnostics, which is unrelated to manifest search functionality.

2. Error message already shows search paths by default

The current implementation in ToolManifestFinder.cs displays search paths automatically:

throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, 
    string.Join(Environment.NewLine, allPossibleManifests.Select(f => "\t" + f.manifestfile.Value))));

With the error message template:

Cannot find a manifest file. The list of searched paths:
{0}

3. Tests confirm proper behavior

All related tests pass, including:

  • GivenNoManifestFileItShouldThrowAndContainNoManifestGuide
  • Multiple CreateManifestIfNeeded scenarios

4. Issue timeline

Based on the GitHub discussion, the issue was that:

  1. There was supposed to be a -d option to show manifest search paths
  2. This option was never properly implemented
  3. The functionality was instead implemented by always showing search paths in error messages
  4. The error message was updated from suggesting users use -d to directly showing the paths

Conclusion

The manifest search diagnostic functionality is working correctly - search paths are displayed by default in error messages without requiring any special flags. The misleading reference to a -d option has been removed from error messages, making this issue resolved.

No code changes were necessary as the current implementation already provides the desired functionality in the most user-friendly way possible.

Addressing #49880.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Deprecate -d on dotnet tool install --create-manifest-if-needed Analysis: -d option deprecation for dotnet tool install --create-manifest-if-needed already resolved Jul 25, 2025
@Copilot Copilot AI requested a review from marcpopMSFT July 25, 2025 00:02
Copilot finished work on behalf of marcpopMSFT July 25, 2025 00:02
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