Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class library creation #23

Closed
ghlouwho opened this issue Jan 3, 2022 · 2 comments
Closed

class library creation #23

ghlouwho opened this issue Jan 3, 2022 · 2 comments

Comments

@ghlouwho
Copy link

ghlouwho commented Jan 3, 2022

P 162 #1. Needs better explanation, this failed "dotnet new classlib CalculatorLib", Found this... https://docs.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio-code?pivots=dotnet-6-0, and then changed to "dotnet new classlib -o CalculatorLib"

@ghlouwho
Copy link
Author

ghlouwho commented Jan 3, 2022

It is also confusing as to what folder we should be working in. Are we creating the class library in the Instrumenting folder, or a new CalculatorLib folder. This is not written for people new to this.

@markjprice
Copy link
Owner

markjprice commented Jan 3, 2022

I instruct readers to follow the detailed steps in Chapter 1 whenever they create a new project. They are the same steps regardless of if you are creating a console app or class library (except the name of the template to use of course).

  1. Create a folder for the project named CalculatorLib.
  2. Change to that folder.
  3. Create the project using dotnet new [templatename] i.e. dotnet new classlib.

But I agree it'd be worth repeating the detailed steps for this exercise since the change from console to classlib could make a reader not realize it is the same process as creating a console app. I also plan to explain the use of -o flag in Chapter 1 for readers who might prefer that way of creating a project.

I have added an erratum item: https://github.com/markjprice/cs10dotnet6/blob/main/errata.md#page-162---creating-a-class-library-that-needs-testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants