ijrussell / essential-fsharp

Markdown source of Essential F# ebook
MIT License
110 stars 13 forks source link

Incomplete command in Appendix 1 #8

Closed KY64 closed 1 year ago

KY64 commented 1 year ago

Hi @ijrussell I'm currently reading your book to learn about F#. It's quite easy to digest and keeps me interested to know more about the language features. I've arrived in chapter 4 and have issue following the appendix 1 to setup the project.

This line is not working on my end (.NET 6.0)

https://github.com/ijrussell/essential-fsharp/blob/bef2ea6e79dd1d26b53d5270d7152cf1a6b8f319/Chapters/99b%20-%20Appendix1.md?plain=1#L21

[09:37 | ch-3]$ dotnet sln add tests/MyProjectTests/MyProjectTests.fsproj 
Specified solution file temp/learn/fsharp/ch-3/ does not exist, or there is no solution file in the directory.

So I looked at the help command and I should write the command in the following format

Usage:
  dotnet [options] sln <SLN_FILE> add [<PROJECT_PATH>...]

I modify the command from the book a bit to

[09:37 | ch-3]$ dotnet sln MySolution/ add tests/MyProjectTests/MyProjectTests.fsproj 
Project `../tests/MyProjectTests/MyProjectTests.fsproj` added to the solution.

I guess we need to update the example command to dotnet sln MySolution/ add tests/MyProjectTests/MyProjectTests.fsproj so others can follow through

KY64 commented 1 year ago

Never mind, I found that if we put the MyProject inside the MySolution directory then the command works. I was putting MyProject and MySolution in separate directory hence the command does not work. I'll close this issue