3

I am trying to learn to use the SAFE framework and have installed the SAFE template.

I want to add some code to the server which interacts with a MySql DB, but nothing I have tried seems to result in VS2019 recognizing a reference to the MySql.Data library.

I have tried both of

paket add MySql.Data -g Server
paket add MySql.Data

each time followed by

fake build

However, in VS2019, The namespace or module 'MySql' is not defined.

Incidentally, I also tried adding (to a separate instance of the template) the library via Nuget, and unsurprisingly it did not work.

So how am I supposed to add a library to the server? I thought the server was just a plain old dotnet core app. Is it not?

I should also mention that while I have dabbled with paket, I am not exactly a power user. So that might explain my problem.

Chechy Levas
  • 2,206
  • 1
  • 13
  • 28
  • 5
    You need to specify the project you want to add it to (`--project Server`, for example) so that the references is added to that project's `paket.references`. I'd suggest reading the [paket docs](https://fsprojects.github.io/Paket/paket-add.html). – Charles Mager May 12 '19 at 16:49
  • For anyone reading this, Charles has given the correct answer. Problem solved for me. – Chechy Levas May 13 '19 at 07:12

0 Answers0