fsprojects / FSharp.Data.GraphQL

FSharp implementation of Facebook GraphQL query language.
http://fsprojects.github.io/FSharp.Data.GraphQL/
MIT License
394 stars 72 forks source link

FSharp.Data.GraphQL.Client NuGet published on Github not working #432

Closed panthus closed 4 months ago

panthus commented 1 year ago

Description

The Nuget package for the Client published on Github packages does not work: https://github.com/fsprojects/FSharp.Data.GraphQL/pkgs/nuget/FSharp.Data.GraphQL.Client.

Inside the nupkg it is missing the FSharp.Data.GraphQL.Client.DesignTime.dll and FSharp.TypeProviders.SDK.dll dlls in folder lib\netstandard2.0 and in the nuspec the following section is missing to make sure that old style .NET Framework projects do not reference the FSharp.Data.GraphQL.Client.DesignTime.dll dll (would result in namespace clashes at it includes the same code as the Client.dll):

<references>
      <group targetFramework=".NETStandard2.0">
        <reference file="FSharp.Data.GraphQL.Client.dll" />
      </group>
</references>

Repro steps

Install the Client nuget from https://github.com/fsprojects/FSharp.Data.GraphQL/pkgs/nuget/FSharp.Data.GraphQL.Client. The project in which this nuget package is installed will not compile because it is missing the dlls as explained above.

Expected behavior

The project compiles after installing the Client nuget.

Actual behavior

Project cannot be compiled because of following error:

Error   FS3031  The type provider '<homedir>\.nuget\packages\fsharp.data.graphql.client\2.0.0\lib\netstandard2.0\FSharp.Data.GraphQL.Client.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.GraphQL.Client.DesignTime.dll' which cannot be loaded from path '<homedir>\.nuget\packages\fsharp.data.graphql.client\2.0.0\lib\netstandard2.0\FSharp.Data.GraphQL.Client.DesignTime.dll'. The exception reported was: System.IO.FileNotFoundException - Could not load file or assembly 'file:///<homedir>\.nuget\packages\fsharp.data.graphql.client\2.0.0\lib\netstandard2.0\FSharp.Data.GraphQL.Client.DesignTime.dll' or one of its dependencies. The system cannot find the file specified.

Known workarounds

Manually edit the nupkg to include the two missing dlls and missing section in the nuspec as specified in the description above.

Related information

-

xperiandri commented 8 months ago

Fixed in #453 Try with the latest published version. Thank you for reporting!

xperiandri commented 4 months ago

@panthus have you tried package from the GitHub feed?

xperiandri commented 4 months ago

I tested the compilation that it works. Reopen if you find any issues

panthus commented 4 months ago

Thank you very much, it works now! :)

Sorry for the late response