Giter VIP home page Giter VIP logo

Comments (4)

nojaf avatar nojaf commented on July 23, 2024 1

Hello,

I think this might be the same problem as in #616 (comment).

Could you try and reference the missing dll using the ?otherFlags parameter?
Something like otherFlags = [ "-r:MyPath/ToMy/Assembly.dll" ]

from fsharp.formatting.

kMutagene avatar kMutagene commented on July 23, 2024 1

Adding references the way you suggested works fine, thanks. here is the solution. Note that i used <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> in my .fsproj file so that the dependency dlls are put into the same folder as the compilation output of the library.

I hoped that the references would not be necessary then, because the dependency dlls are in the same folder, but i still have to set the otherFlags option sadly.

ApiDocs.GenerateHtml(
    inputs = [
        ApiDocInput.FromFile(
            @"path\to\bin\Debug\netstandard2.0\Plotly.NET.dll"
        )
    ],
    output = @"C:\Users\schne\source\repos\plotly\Plotly.NET\src",
    collectionName = "Plotly.NET",
    substitutions = [],
    otherFlags = [ 
        @"-r:path\to\bin\Debug\netstandard2.0\Giraffe.ViewEngine.StrongName.dll" 
        @"-r:path\to\bin\Debug\netstandard2.0\DynamicObj.dll"
        @"-r:path\to\bin\Debug\netstandard2.0\Newtonsoft.Json.dll"
    ]
)

from fsharp.formatting.

kMutagene avatar kMutagene commented on July 23, 2024

Hi @nojaf, thanks for the response, I'll give this a spin.

However, the referenced assemblies are not contained in the compilation output, so I guess the standard way is referencing these packages from the nuget cache (i do not use paket)?

from fsharp.formatting.

kMutagene avatar kMutagene commented on July 23, 2024

For future reference, I found that setting libDirs is enough when all dependencies are in one folder:

A combination of <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> in the fsproj file and setting libDirs to the compilation output path leads to only one folder with all dependecies referenced. This might be easier especially for large projects with many dependencies:

ApiDocs.GenerateHtml(
    inputs = [
        ApiDocInput.FromFile(
            @"C:\Users\schne\source\repos\plotly\Plotly.NET\src\Plotly.NET\bin\Debug\netstandard2.0\Plotly.NET.dll"
        )
    ],
    output = @"C:\Users\schne\source\repos\plotly\Plotly.NET\src",
    collectionName = "Plotly.NET",
    substitutions = [],
    libDirs = [ @"C:\Users\schne\source\repos\plotly\Plotly.NET\src\Plotly.NET\bin\Debug\netstandard2.0\"]
)

from fsharp.formatting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.