Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

NuGet: Copying .DLL file without creating a reference?

$
0
0

I am working on my first open source project and now I want to create a NuGet from it so it is easy to use. In my project i'm using a DLL (CoolProp.dll) which is a third-party dll.

When running the program it needs to have the dll in:

..\bin\Release\CoolProp.dll

In the Solution Explorer (VS) I have set the CoolProp.dll to:

Build Action: None
Copy to Output Directory: Copy always

All this works as it should when just running the code.

In the .nuspec file I have added: (for it to copy the dll file)

<file src="bin\Release\CoolProp.dll" target="lib\net461" />

When installing the Nuget I get the followering error:

Failed to add reference to 'CoolProp'
Please make sure that the file is accessible, and that it is a valid assembly or COM component.

I am guessing it is trying to add a reference to the dll file, which its shouldn't do. It should just copy it and nothing else.

What am I doing wrong? or is there something I have misunderstood?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>