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

Missing ICSharpCode.SharpZipLib dependency? #3

Closed
dennisroche opened this issue Feb 2, 2017 · 5 comments
Closed

Missing ICSharpCode.SharpZipLib dependency? #3

dennisroche opened this issue Feb 2, 2017 · 5 comments
Labels

Comments

@dennisroche
Copy link
Contributor

Hi,

I'm having difficulty using Cake.Compression in our build.

The .cake file.

// Using Cake (C# Make) http://cakebuild.net

#addin "Cake.Compression"
#tool "nuget:?package=SharpZipLib"

Gives the error message,

Error: Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies. The system cannot find the file specified.

I tried to resolve it by adding the #tool "nuget:?package=SharpZipLib" reference to no avail.

@dennisroche dennisroche changed the title ICSharpCode.SharpZipLib dependency Missing ICSharpCode.SharpZipLib dependency? Feb 2, 2017
@akordowski
Copy link
Owner

Thanks for your message. This sounds like the build server cannot download the SharpZipLib package properly from NuGet. Please verify that the build server can download packages from NuGet or/and the Cake.Compression AddIn isn't downloaded manually from NuGet. Besides I will take a look at this issue.

@dennisroche
Copy link
Contributor Author

dennisroche commented Feb 7, 2017

Thanks for getting back to me.

The SharpZipLib package is downloaded by nuget correctly, under the tools\Addins directory.

+---Addins
|   +---Cake.Compression
|   |   \---lib
|   |       \---net45
|   \---SharpZipLib
|       \---lib
|           +---11
|           +---20
|           +---SL3
|           \---SL4
+---Cake

Extracting the Cake.Compression.nupkg, I can verify that the dependency is specified correctly in the .nuspec.

I'm have been able to workaround the issue by copying the ICSharpCode.SharpZipLib.dll to the Addins\Cake.Compression\lib\net45

// Hack: Cake.Compression is missing local copy of SharpZipLib dependencies
if (!FileExists("./tools/Addins/Cake.Compression/lib/net45/ICSharpCode.SharpZipLib.dll")) {
    CopyFile("./tools/Addins/SharpZipLib/lib/20/ICSharpCode.SharpZipLib.dll",
        "./tools/Addins/Cake.Compression/lib/net45/ICSharpCode.SharpZipLib.dll");
}

@akordowski
Copy link
Owner

Thanks for your feedback and the detailed informations. I will took a look into it later this week and then get back to you.

@akordowski akordowski added the bug label Feb 7, 2017
@Sam13
Copy link

Sam13 commented Mar 8, 2017

I think this is not a bug of Cake.Compression.
In my Cake script I have to do the following to get it working:

#addin nuget:?package=SharpZipLib&version=0.86.0
#addin nuget:?package=Cake.Compression&version=0.1.0

This is because Cake does not resolve NuGet dependencies when downloading an addin.
See cake-build/cake#787

@akordowski
Copy link
Owner

@Sam13 Thank you for the hint. I wasn't aware of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants