Paket icon indicating copy to clipboard operation
Paket copied to clipboard

How to refererence DLLs inside of a ZIP Archive?

Open tiavision opened this issue 5 years ago • 1 comments

Description

I have a few DLLs from a third-party vendor which I want to reference in a project. From the documentation it looks like I could pack them as zip file, and add a http-reference to paket.dependencies. The zip file is then downloaded and extracted. How would I reference the files in the zip now in a paket.references? The best I could do was to add a new line to paket.references like File: myzip.zip, but this does not include all DLLs from the zip but the zip-file itself.

Is there a way to handle this usecase or is this the wrong way to reference a bunch of related DLL files with paket?

tiavision avatar Jan 16 '20 17:01 tiavision

I was struggling with the same issue. I only had enough power to manually reference a bunch of .dlls.

So, it looks like below

paket.dependencies
http <url> <file1>
http <url> <file2>
paket.references
File: <file1>
File: <file2>

Apparently, it's also possible to manually reference those .dlls from the project file (.fsproj / .csproj).

It'll be like below

paket.dependencies
http <url>
MyProj.fsproj
<Project Sdk="Microsoft.NET.Sdk">
    <ItemGroup>
        <Reference HintPath="..\paket-files\url-domain\file1.dll" />
        <Reference HintPath="..\paket-files\url-domain\file2.dll" />
    </ItemGroup>
</Project>

However, you don't need to add anything to paket.references, this might be better if there's a lot of .dlls (less duplication).

iRebbok avatar Jul 23 '21 22:07 iRebbok