Unable to run the example

Rob Meade 20 Reputation points
2024-07-08T10:49:12.7233333+00:00

Hi,

On:
https://learn.microsoft.com/en-gb/training/modules/dotnet-debug-visual-studio/7-use-logging-and-tracing

It states to run "dotnet run", doesn't really explain how/where, but also the name of the application was "DotNetDebugging", so I think there might be a couple of issues here. Trying "dotnetdebugging run" in the terminal also doesn't work

Needless-to-say, unsure how to proceed with this module.

This question is related to the following Learning Module

Visual Studio Training
Visual Studio Training
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Training: Instruction to develop new skills.
25 questions
{count} votes

Accepted answer
  1. Pradeep M 4,560 Reputation points Microsoft Vendor
    2024-07-08T11:59:58.88+00:00

    Hi Rob Meade,

    Thank you for reaching out to the Microsoft Q&A forum. 

    I understand your concerns regarding the instructions provided in the exercise. Let me clarify the steps for you. 

    When the instructions mention running dotnet run, it refers to running the command in the terminal within the project directory where your .NET application resides. Here’s a detailed guide on how to proceed: 

    1.Open your terminal or command prompt: You can use any terminal or command prompt available on your system. 

    2.Navigate to your project directory: Ensure you are in the directory where your .csproj file for the DotNetDebugging application is located. You can use the "cd" command to change directories. For example: 

    cd C:\Users\pradeep\project\DotNetDebugging
    

    3.Run the application in Debug configuration: Use the following command to run your application in the Debug configuration: 

    dotnet run
    

    4.Run the application in Release configuration: If you need to run it in the Release configuration, use: 

    dotnet run --configuration Release  
    

    If you encounter issues with the dotnet run command, ensure that you are in the correct directory and that your project is correctly set up. The command dotnet run should work within any .NET project directory. 

    If you follow these steps and still encounter issues, please provide any error messages you receive so that I can assist you further. 

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.     

    Thank you. 

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.