none
C# Console Application Build Time RRS feed

  • Question

  • I am developing a C# Console Application using Visual Studio Code. I am currently using .NET Core 3.0 in the project, and use "dotnet run" command to run it. The command runs very slowly, the application is slow to startup. If I use "dotnet build" command, this command is also slow.

    Visual Studio 2019 .NET Core C# project build and startup very fast. But I don't want to use Visual Studio, I want to use command line toolchain.

    Is there a way to build and run C# Console Application fast, other than using Visual Studio?

    Monday, November 11, 2019 2:59 PM

Answers

All replies

  • Hi,

    Since this issue is related to C#, this thread will be moved to C# forum for better support.

    Best regards,

    Jeffrey


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 12, 2019 2:19 AM
  • Hi AAABBBCCCDDD00001111, 

    Thank you for posting here.

    You can refer to the following steps to build and run your .NET Core application.

    First of all, you need to go into your project folder which contains your .csproj file.

    Then use command line to go into this path.

    Then you can build the application with command ‘dotnet build’.

    Finally, use ‘dotnet run Program.cs’ to run your application.

    Besides, you can also refer to the suggestions in the following references.

    1. How to run .NET Core console app from the command line
    2. Can I build .NET Core applications on a Windows server without Visual Studio installed?

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 12, 2019 9:00 AM
    Moderator