p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional C# 6 and .NET Core 1.0 (http://p2p.wrox.com/forumdisplay.php?f=801)
-   -   dotnet new (http://p2p.wrox.com/showthread.php?t=99749)

MattSA January 16th, 2018 06:34 PM

dotnet new
 
I am working in chapter 1 of this book. Under the heading 'Building the Application' (on page 19) it suggests entering the following command:

>dotnet new

to create three files - Program.cs, NuGet.config, and project.json files. However, when I enter this command it just presents a help scenario. From this information, I was able to use the following commands:

>dotnet new console // Creates the Program.cs file
>dotnet new nugetconfig // Creates a nugget.config file
>dotnet new globaljson // Creates a global.json file

However, none of the files created are linked or produce the output discussed after the dotnet new instruction.

Can someone identify the correct statement to produce the three files at once?

MattSA

aarush January 22nd, 2018 06:10 AM

Very useful information!!
Automation Training in Chennai|selenium training

ChristianNagel January 22nd, 2018 10:46 AM

Quote:

Originally Posted by MattSA (Post 309571)
I am working in chapter 1 of this book. Under the heading 'Building the Application' (on page 19) it suggests entering the following command:

>dotnet new

to create three files - Program.cs, NuGet.config, and project.json files. However, when I enter this command it just presents a help scenario. From this information, I was able to use the following commands:

>dotnet new console // Creates the Program.cs file
>dotnet new nugetconfig // Creates a nugget.config file
>dotnet new globaljson // Creates a global.json file

However, none of the files created are linked or produce the output discussed after the dotnet new instruction.

Can someone identify the correct statement to produce the three files at once?

MattSA

The project files changed with the release of the SDK and Visual Studio 2017. You can download the two additional chapters with changes on the project files, and with updates for C# 7.0:
http://cninnovation.com/Books

Also, see changes here:
https://github.com/ProfessionalCShar...BookUpdates.md

With .NET Core 1.0, a console app was created using "dotnet new". With 2.0, you need a "dotnet new console".

I hope this helps.


All times are GMT -4. The time now is 03:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.