dotnet CLI परिचय
dotnet command एक helper है जिससे आप terminal में बात करते हैं जो नए projects शुरू, build, और run कर सकता है। यह एक butler जैसा है जो आपके ideas पर ध्यान देते हुए setup के काम करता है।
In this page:
Syntax
dotnet new console -n ProjectName // create a project
dotnet build // compile
dotnet run // build and run
The dotnet CLI
dotnet command-line tool बिना किसी IDE के C# projects बनाता, build करता, और चलाता है।
dotnet new console एक चलने योग्य console project scaffold करता है, dotnet build इसे compile करता है, और dotnet run इसे एक step में build और execute करता है। यह tool किसी भी platform पर .NET development का standard entry point है।
Note:
अगर पिछले build के बाद से source files बदल गई हों तो
dotnet run अपने आप फिर से build करता है।उदाहरण: The dotnet CLI
# Create a new console project in the current folder
dotnet new console -o HelloApp
cd HelloApp
# Build without running
dotnet build
# Build and run in one step
dotnet run
⚠️ Run this in your own terminal or Node.js environment.
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- किसी project file के बिना folder से
dotnet runचलाना, जो कोई project न मिलने की error देता है। dotnet build(compile करता है) कोdotnet run(build और run करता है) के साथ confuse करना।- किसी दूसरे project के folder के अंदर एक project बनाना, जो build को गलत files उठाने पर मजबूर कर सकता है।
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: