Closed Shuliyey closed 8 years ago
Yes, it is. Good point, I should create a dependency between the packages.
Hi @luuksommers
thanks for taking a look at this.
I found that when I install SevenZipSharp.Interop through nuget, (.Net Framework 4.6), the library is installed but the reference doesn't get automatically added to the project.
I believe this is to do with the library path structure.
currently the library directory is in the structure
build/net
I believe the library directory structure should be
lib/net
I believe in this format, the library will be automatically added to reference
New version is uploaded to that adds the dependency to the SevenZipSharp and removes the framework dependencies. nuget.
Hi Luke,
thank you for updating this over night :smile:
I'm just wondering I still don't see the SevenZipSharp.Interop dll gets added to reference automatically, after installing the license.
I also tried to manually adding the 7z.dll, the following error occurs
I'm using visual studio 2015
You don't have to; it are the C++ dll's from 7zip. The actual interop is done by SevenZipSharp itself, but you need to have the C++ dll's in your output folder to make SevenZipSharp work.
If everything is correct, when you compile your application, you should see an x64 and an x86 folder in your bin\Debug directory.
Then you can test it with the following code:
// Toggle between the x86 and x64 bit dll
var path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),Environment.Is64BitProcess ? "x64" : "x86", "7z.dll");
SevenZip.SevenZipBase.SetLibraryPath(path);
using (var fileStream = new BufferedStream(File.OpenRead(@"<filename>"), 100000))
{
using (SevenZipExtractor extractor = new SevenZipExtractor(fileStream))
{
extractor.ExtractArchive(".");
}
}
I see thank you Luke :smile: , nice one
I hope there's a way to configure in the Visual Studio, so that only the x64 is copied locally to the compile directory.
But this covers all situation nice :smile:
You can always delete the x86 folder in the output dir in a post-build script, or delete it from the /build directory.
On Fri, Dec 18, 2015 at 12:11 AM, 叶泽宇 notifications@github.com wrote:
I see thank you Luke [image: :smile:] , nice one
I hope there's a way to configure in the Visual Studio, so that only the x64 is copied locally to the compile directory.
But this covers all situation nice [image: :smile:]
— Reply to this email directly or view it on GitHub https://github.com/luuksommers/SevenZipSharp.Interop/issues/1#issuecomment-165611538 .
thank you so much Luke :smile:
It worked, I put the 64bit 7z.dll in the build directory, and the dll get copied to the compiled folder :+1:
@luuksommers This should not have a dependency on SevenZipSharp, though my comment is coming a bit late.
I'm currently working on a 100% private port of SevenZipSharp, and was tempted to use this package to supply the 7z DLLs, but couldn't because it would mean my modification of SevenZipSharp would have a dependency on... SevenZipSharp.
I'm open for pull requests 😁
On Oct 27, 2017 8:19 PM, "Kesmy" notifications@github.com wrote:
@luuksommers https://github.com/luuksommers This should not have a dependency on SevenZipSharp, though my comment is coming a bit late.
I'm currently working on a 100% private port of SevenZipSharp, and was tempted to use this package to supply the 7z DLLs, but couldn't because it would mean my modification of SevenZipSharp would have a dependency on... SevenZipSharp.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/luuksommers/SevenZipSharp.Interop/issues/1#issuecomment-340047058, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIYH3F4cQGs1nyJlew5T197OH3Ix4_iks5swh6rgaJpZM4G0eVm .
@luuksommers Just pointing out the weirdness! Changing it now would break things for most consumers, I think. Maybe one day if SevenZipSharp ever gets revived as an active project...
@luuksommers is there any way we can copy this 2 folders into depedant projects. for example i have project A which has SevenZipSharp.Interop reference and there i am getting all the folders properly like x64 and x32. but when i reference Project A to Project B at that time it dosen't copy folders into Project B's bin directory. is there any way we can do this without adding nuget package on project B?
@sandipdsp1990 The nuget only needs to be referenced in the executing project, this could be the Console app, or for example test projects. As far as I'm aware of, there is no way to copy these satellite assemblies to referencing project on build.
Hi
Thanks for making this library
Just wondering whether SevenZipSharp is also required to use this library.