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

Update JsonProvider.fsx #1334

Merged
merged 3 commits into from
Jan 13, 2021
Merged

Update JsonProvider.fsx #1334

merged 3 commits into from
Jan 13, 2021

Conversation

psfinaki
Copy link
Contributor

I was struggling with that and things were not working until I found this comment noting that point about project file. I think it would be useful for others as well.

I was struggling with that and things were not working until I found [this comment](fsprojects#1191 (comment)) noting that point about project file. I think it would be useful for others as well.
@nhirschey
Copy link
Contributor

  1. In dotnet core, does "MyLib" also need to be added to the embedded embedded resource string? Such as in
type WB = JsonProvider<"../data/WorldBank.json", 
 EmbeddedResource="MyLib, MyLib.worldbank.json"

I'm looking at https://github.com/fsharp/FSharp.Data/blob/08f351820f8b44c21ac6fb5afb30be0236332d0d/tests/FSharp.Data.Tests/JsonProvider.fs#L19

  1. It would also be nice to show explicitly how to include the embedded resource in the project file.

@psfinaki
Copy link
Contributor Author

psfinaki commented Dec 1, 2020

@nhirschey,

  1. Well my case was dotnet core, so yes
  2. Added a link to MSDN, there is also a screenshot with options, I guess it should be sufficient

@nhirschey
Copy link
Contributor

nhirschey commented Dec 2, 2020

Yeah, my point is to make dotnet core the default, so change line 303 to

  EmbeddedResource="MyLib, MyLib.Worldbank.json">

@nhirschey nhirschey mentioned this pull request Dec 2, 2020
@nhirschey
Copy link
Contributor

I also ran into this last week with FSharp.Data.Toolbox, and knowing that in dotnet core you need MyLib at the front would have helped. Just trying to help the next poor souls so they don't have our issues ;)

@psfinaki
Copy link
Contributor Author

psfinaki commented Dec 2, 2020

Oh that thing, yeah sure, added the path there :)

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

Successfully merging this pull request may close these issues.

3 participants