Problem
Users experience 'phantom' command line arguments being utilized when debugging or running their application in Rider, despite these arguments not being defined in the standard configuration files (e.g., launchSettings.json , .csproj , not manually written by a user).
Cause
This issue commonly arises when additional MSBuild configuration files in the project or higher up in the directory structure define these arguments implicitly. Files such as csproj.user files, or Directory.Build.props, might include configurations that are not immediately visible.
Resolution
-
Verify MSBuild Configuration Files: Check for any
.propsor.userfiles within the project directory or higher up in the directory structure that may implicitly define the phantom arguments.Example paths to verify:
- Project folder (
.csproj.useror.propsadjacent to the project files) - Parent directories with
Directory.Build.props
- Project folder (
-
Visual Inspection in Rider:
- Right-click the problematic project in the Solution Explorer.
- Navigate to the Properties dialog.
- Check the Imports section to identify external props files contributing to the build system definitions.
- Identify and Modify Offending Definitions: Locate and edit the definitions causing the issues or create exclusions in your project build configuration to bypass undesired entries.
By following these steps, you should be able to figure out the source of the undesired command line arguments.
Comments
0 comments
Please sign in to leave a comment.