I have accidently change my dotnet run to dotnet run --project

Billee Mason 20 Reputation points
2024-08-20T14:23:42.5033333+00:00

Hello all,

Probably just a simple problem.

When learning to set up a new program, I changed the command from

"dotnet run" to "dotnet run --project".

Although it still works, when I enter dotnet run, the "--project" part shows up. How can I make this disappear from the prompt?

Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-08-21T07:28:09.09+00:00

    Hi @Billee Mason , Welcome to Microsoft Q&A,

    You can try the following steps:

    1. Check the Project Properties:
    • Right-click on your project in the Solution Explorer and select Properties.
    • Navigate to the Debug tab.
    • Ensure that the Command line arguments field does not include --project. If it does, remove it.
    1. Check the .csproj File:
    • Open the .csproj file associated with your project.
    • Look for any <RunArguments> or similar settings that might include --project. If found, remove or modify them accordingly.
    1. Reset Debug Configurations:
    • Go to Debug > Options > General.
    • Click on Reset all settings to reset any custom debug settings that might be causing this behavior.
    1. Rebuild the Solution:
    • Sometimes a rebuild can resolve persistent issues. Go to Build > Rebuild Solution to ensure everything is up-to-date.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.