Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 6 > BOOK: Professional C# 6 and .NET Core 1.0
|
BOOK: Professional C# 6 and .NET Core 1.0
This is the forum to discuss the Wrox book Professional C# 6 and .NET Core 1.0 by Christian Nagel; ISBN: 978-1-119-09660-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 6 and .NET Core 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2016, 11:43 AM
Authorized User
 
Join Date: Aug 2016
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default Error in Chapt 1: Setting up enivronment.

I finally got my feed back when I type:
> dotnet
> dotnet --version
and >dotnet --help
after four hours of configuration.
I was very excited.

But now when I type in
>dotnet repl
I get:
"No executable found matching command "dotnet-repl".

Does anyone know what this means?
The strange thing is in the command window this message is in red letters.
How do I fix this?
 
Old August 7th, 2016, 01:01 PM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

dotnet repl is currently not available with Preview 2 of the CLI (dotnet) tools. It will be available at a later time via tools-extension.
See https://github.com/ProfessionalCShar...BookUpdates.md for updates.

What you see with the error message is the extensibility mechanism of the CLI tools. If you type
>dotnet ef
You will see the error message "No executable found matching command "dotnet-ef". In a later chapter (Entity Framework), you will see how the dotnet tools can be extended with ef.
dotnet repl will be available with a similar mechanism, but it is not available with Preview 2.

I hope you enjoy the book and .NET Core.
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
 
Old August 7th, 2016, 05:13 PM
Authorized User
 
Join Date: Aug 2016
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default Building the Application

Thank you Christian.
Yes - I am enjoying the book.

I moved on to Building the Application and got everything to work for the most part.
Although there are many differences between the book and what is actually happening.
The generated JSON is very different from the book. Probably because things have changes since the book was published which is to be expected.

The JSON in the actual generation is quite a bit different though:

{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

I don't see "netstandardappl.5 for one.
Although I do see all the Nuget packages under my profile. Is this from dotnet restore and the JSON "Microsoft.NETCore.App" dependency? As opposed to NetStandard.Library in the book? NetStandard.Library is not generated for me. Maybe this is now considered a default or something. Tons of Nuget packages in my profile from that one restore for HelloWorldApp.

Also there is no Win7 in intellisense for runtimes.

And the strangest thing is if I open up the JSON config in Visual Studio to use the intellisense, for "type", the default is tagged as an invalid type and it must be "build" or "default". And in the generated JSON from the book there is no type.

I probably just need to read the chapter again.
It will flow quicker now that I have all the fixes.
Also just need to get some experience with all of this.
 
Old August 7th, 2016, 06:01 PM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

The generated json file differs a bit, but there's not really that much difference. Also see the file https://github.com/ProfessionalCShar...BookUpdates.md for differences in project.json.

netstandardapp1.5 has been changed to netcoreapp1.0.

NETStandard.Library is still valid, but it's included from netcoreapp1.0, and only needed explicitly from libraries.

If you configure the type to "platform" (which is now generated by default), the runtimes section is not needed, but you need to deploy the shared runtime on the target system. If the type section is changed, you can build a self-hosting app - and need to declare the runtimes.
This reminds me about writing a blog article about this feature. I will add a link to this conversation as soon as I have my blog article at https://csharp.christiannagel.com public.

Thanks,
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
 
Old August 8th, 2016, 07:17 AM
Authorized User
 
Join Date: Aug 2016
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default netstandardapp1.5 to netcoreapp1.0

Ah, I thought that was it.

I just bookmarked your updates page.
And I must start reading your blogs.

So glad I found you as an author.
Moving on to building in Visual Studio!

I will post more questions as I move through the book.
The Following User Says Thank You to smiller781 For This Useful Post:
ChristianNagel (August 8th, 2016)
 
Old August 11th, 2016, 03:39 AM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

as promised, I just published the article on self-contained application:
https://csharp.christiannagel.com/20...selfcontained/
This is when the runtimes section is now needed in project.json.

Cheers,
 
Old August 16th, 2016, 12:23 AM
Registered User
 
Join Date: Aug 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You also need to post more questions too.
 
Old August 18th, 2016, 05:21 AM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

Quote:
Originally Posted by simonwalker View Post
You also need to post more questions too.
It seems like all questions are already answered in the book :-)
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
 
Old December 3rd, 2016, 09:45 AM
Registered User
 
Join Date: Dec 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I typed dotnet new command, why no nuget.config file in the HelloWorldApp folder ?
 
Old December 3rd, 2016, 10:26 AM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

Quote:
Originally Posted by dVVb View Post
I typed dotnet new command, why no nuget.config file in the HelloWorldApp folder ?
@dVVb - it would be better to create a new question instead of posting to an existing one. This would help for searching and knowing if there already have been answers.

To answer your question: you don't need a separate nuget.config file in the project folder. If there is no file, the NuGet servers as defined in %appdata%\NuGet\NuGet.config are used. If you need a different configuration for NuGet servers based on this project, add a NuGet.config file to the project.

Hope this helps.
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error setting up Excel services fisk BOOK: Professional SharePoint 2013 Administration 3 October 23rd, 2013 04:33 PM
Chapt 20 Source Code and Error intilli4 BOOK: Beginning iOS 4 Application Development 0 November 24th, 2010 05:04 AM
Chapt 9, Pg 227. Error? ericfields6483 BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 October 2nd, 2005 12:46 PM
ASP.NET Using VB.NET Chapt 3 Code error? uh6uj All Other Wrox Books 1 February 26th, 2004 10:46 AM





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