|
Никитка98 0 / 0 / 0 Регистрация: 03.11.2017 Сообщений: 8 |
||||
|
1 |
||||
|
15.03.2018, 19:37. Показов 2074. Ответов 4 Метки 7-zip (Все метки)
Собственно вот код
Текст ошибки собственно такой: перепробовал кучу всего уже и заносил sevenzipsharp.dll в C:WindowsSysWOW64, проверял так же на наличие повреждений,глухо всё, может кто знает в чём проблема?
__________________
0 |
|
OwenGlendower Администратор 15248 / 12287 / 4904 Регистрация: 17.03.2014 Сообщений: 24,883 Записей в блоге: 1 |
||||
|
16.03.2018, 12:52 |
2 |
|||
|
Никитка98, насколько я понимаю необходимо положить рядом с программой 7z.dll из каталога с 7-zip. Или указать путь к нему перед началом работы
0 |
|
0 / 0 / 0 Регистрация: 03.11.2017 Сообщений: 8 |
|
|
16.03.2018, 19:46 [ТС] |
3 |
|
Ничего не изменилось, ошибка та же(
0 |
|
Администратор 15248 / 12287 / 4904 Регистрация: 17.03.2014 Сообщений: 24,883 Записей в блоге: 1 |
|
|
16.03.2018, 19:48 |
4 |
|
Никитка98, что именно ты сделал? Положил библиотеку рядом с exe или установил путь из программы? Если второе, то путь верный? Вызов делается SetLibraryPath до обращения к другим методам библиотеки?
0 |
|
Никитка98 0 / 0 / 0 Регистрация: 03.11.2017 Сообщений: 8 |
||||
|
16.03.2018, 19:57 [ТС] |
5 |
|||
|
OwenGlendower, Пробовал и то, и то, путь конечно же проверил,писал так же относительный путь, но бестолку, да вызов делаю в начале программы:
0 |
|
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
16.03.2018, 19:57 |
|
5 |
Hi all,
I am using SevenZipSharp component in my application (.net windows service) for extraction, SevenZipSharp requires 7z.dll which gets loaded at runtime. My application is working fine on my local machine but when on a 64-bit server where my application is running as 32-bit i am getting an error:
(1) When 64-bit 7z.dll is used then below exception is getting logged:
SevenZip.SevenZipLibraryException was caught
Message=»Can not load 7-zip library or internal COM error! Message: failed to load library.»
Source=»SevenZipSharp»
StackTrace:
at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
at SevenZip.SevenZipExtractor.Init(Stream stream, InArchiveFormat format)
at SevenZip.SevenZipExtractor..ctor(Stream archiveStream, InArchiveFormat format)
(2) when 32-bit 7z.dll is used then below exception:
Message: SevenZip.SevenZipLibraryException: Can not load 7-zip library or internal COM error! Message: can not change the library path because the file «C:Windowssystem327z.dll» does not exist.
at SevenZip.SevenZipLibraryManager.SetLibraryPath(String libraryPath)
at SevenZip.SevenZipBase.SetLibraryPath(String libraryPath)
at Infosys.DCP.Common.Utility.FileHelper.GetFileNamesInZip(FileInfo infoFile)
at Infosys.DCP.Apps.DataIntegration.Library.CoreEngine.ProcessFile(FileDetails fileDetails)
Please help in resolving this issue.
Thanks,
Comments
3F
changed the title
7z x64 & amd64msbuild.exe: Can not load 7-zip library or internal COM error
7z & amd64msbuild.exe: Can not load 7-zip library or internal COM error
Dec 6, 2016
3F
added a commit
to 3F/GetNuTool
that referenced
this issue
Dec 8, 2016
…onBuildEvent#38 also fixes `-unpack` & `-msbuild` commands for gnt.bat when using double quotes
3F
added a commit
to 3F/GetNuTool
that referenced
this issue
Dec 8, 2016
* NEW: Executable version. Implemented `-unpack` command.
To generate minified version from executable.
```
gnt -unpack
```
* NEW: Executable version. Implemented `-msbuild` command.
To use specific msbuild for executable version.
```
gnt -msbuild "D:MSBuildbinamd64msbuild" /p:ngpackages="Conari"
```
* NEW: Added ';' splitter for .config files.
The `|` now is marked as obsolete and can be removed in new versions.
* NEW: MSBuild-helper with `-notamd64` option.
Related issue: 3F/vsSolutionBuildEvent#38
* FIXED: Part of unhandled exceptions has been changed on messages to stderr:
`The "PrepareList" task failed unexpectedly / FileNotFoundException`
The "NGPack" task - DirectoryNotFoundException & The "NGDownload" task - WebException 404
* CHANGED: Value of `ngconfig` property now is `packages.config` by default.
3F
added a commit
that referenced
this issue
Sep 26, 2019
* NEW: Integration with MvsSln project. v2.4 PR #53.
Replaces processing from IsolatedEnv/MSBuild/+ and fully removes our old parser.
Finally it fixes lot of bugs (such as: #42, #41, #40,..) and also improves performance.
https://github.com/3F/MvsSln
* NEW: Open Source independent script engines under the MIT License. Issue #55.
* NEW: Integration with E-MSBuild project. v1.14. Part of PR #56.
Advanced Evaluator of MSBuild scripts with user-variables support through Varhead and more.
https://github.com/3F/E-MSBuild
* NEW: Integration with SobaScript -- an Extensible Modular Scripting Programming Language.
Part of PR #56.
https://github.com/3F/SobaScript
* NEW: Included SobaScript Components:
Z.Core: https://github.com/3F/SobaScript.Z.Core
* ConditionComponent
* EvMSBuildComponent
* UserVariableComponent
* TryComponent
* CommentComponent
* BoxComponent
Z.Ext: https://github.com/3F/SobaScript.Z.Ext
* SevenZipComponent
* NuGetComponent
* FileComponent
* FunctionComponent
Z.VS: https://github.com/3F/SobaScript.Z.VS
* DTEComponent
* OwpComponent
* BuildComponent
* FIXED: Possible "Can not load 7-zip library or internal COM error"
When using x64 instance. Issue #38.
* FIXED: Possible "An equivalent project is already present in the project collection."
Issue #42.
* FIXED: Possible incorrect projects for MSBuild Properties
~ $(TargetFrameworkVersion:Metadata) Issue #41.
* FIXED: Failed getting project from EnvDTE. Issue #40.
* CHANGED: Increased performance when evaluating data and scripts.
* CHANGED: Updated 7z.Libs 19.0.1.
* CHANGED: Updated AvalonEdit 5.0.4
* CHANGED: Updated Microsoft.VisualStudio.Shell.15.0 15.9.28307
* CHANGED: SDK15 packages only:
Updated Microsoft.Build & Microsoft.Build.Framework 16.0.461
* CHANGED: Updated EnvDTE 8.0.2
* CHANGED: Updated EnvDTE80 8.0.3
* CHANGED: Updated Newtonsoft.Json 12.0.2
* CHANGED: Updated Microsoft.VisualStudio.SDK.EmbedInteropTypes 15.0.27
* CHANGED: StreamJsonRpc 2.0.208
* CHANGED: System.ValueTuple 4.5.0
* CHANGED: NuGet package `vsSBE.CI.MSBuild` is obsolete. Please use new:
https://www.nuget.org/packages/vsSolutionBuildEvent
Also new 'tools' folder instead of 'bin'.
* KNOWN: Possible Failed Project.Pre/Post-binding: 'Object reference not set to an instance of an object.'
Issue #43.
Please enable debug mode, we're waiting for your reports.
* KNOWN: Known problem for VS2019. Build can be started before activation of our plugin.
This is a feature of the modern VS platform with lazy loading of all plugins.
Solution:
Just attach once our [status panel] and this will always activate our plugin before start.
* KNOWN: Known problem when deactivated [Status Panel] from `View` - `Other Windows`.
Incorrect identifier in previous version produces wrong tool.
Solution:
Just close this panel. Then, open it again from `View` - `Other Windows`.
* NOTE: Please note. New releases has been migrated from SourceForge to GitHub Release Page:
https://github.com/3F/vsSolutionBuildEvent/releases
https://vssbe.r-eg.net/Downloads/
* NOTE: Here is about SDK10 / SDK15 packages:
https://vssbe.r-eg.net/doc/Usage/#sdk10--sdk15-versions
3F
added a commit
to 3F/vsCommandEvent
that referenced
this issue
Oct 21, 2019
* NEW: Visual Studio 2019 full support. SDK15.
* NEW: Complete integration with VS2017. SDK15.
For VS2017 will be also available old SDK10 package implementation.
But SDK15 is recommended.
* NEW: Integration with MvsSln project. v2.5.
Replaces processing for Advanced MSBuild.
https://github.com/3F/MvsSln
* NEW: Integration with E-MSBuild project. v1.14.
Advanced Evaluator of MSBuild scripts with user-variables support through Varhead and more.
https://github.com/3F/E-MSBuild
* NEW: Integration with SobaScript -- an Extensible Modular Scripting Programming Language.
https://github.com/3F/SobaScript
* NEW: Included SobaScript Components:
Z.Core: https://github.com/3F/SobaScript.Z.Core
* ConditionComponent
* EvMSBuildComponent
* UserVariableComponent
* TryComponent
* CommentComponent
* BoxComponent
Z.Ext: https://github.com/3F/SobaScript.Z.Ext
* SevenZipComponent
* NuGetComponent
* FileComponent
* FunctionComponent
Z.VS: https://github.com/3F/SobaScript.Z.VS
* DTEComponent
* OwpComponent
* BuildComponent
* FIXED: Fixed IEnvironment.ProjectsMBE implementations.
* FIXED: Possible "Can not load 7-zip library or internal COM error"
When using x64 instance.
Related Issue 3F/vsSolutionBuildEvent#38
* FIXED: Possible "An equivalent project is already present in the project collection."
Related Issue 3F/vsSolutionBuildEvent#42.
* FIXED: Possible incorrect projects for MSBuild Properties
~ $(TargetFrameworkVersion:Metadata) Issue #41.
* FIXED: Failed getting project from EnvDTE.
Related Issue 3F/vsSolutionBuildEvent#40.
* CHANGED: Increased performance when evaluating data and scripts due to new SobaScript and E-MSBuild.
* CHANGED: netfx target platform changes:
* 4.0 only: VS2010, VS2012, VS2013, VS2015, VS2017
* 4.6 only: VS2017, VS2019
* CHANGED: Replaced old msbuild helper on hMSBuild 2.2
https://github.com/3F/hMSBuild
* CHANGED: Updated 7z.Libs 19.0.1.
* CHANGED: Updated AvalonEdit 5.0.4
* CHANGED: Updated Microsoft.VisualStudio.Shell.15.0 15.9.28307
* CHANGED: SDK15 packages only:
Updated Microsoft.Build & Microsoft.Build.Framework 16.0.461
* CHANGED: Updated EnvDTE 8.0.2
* CHANGED: Updated EnvDTE80 8.0.3
* CHANGED: Updated Newtonsoft.Json 12.0.2
* CHANGED: Updated Microsoft.VisualStudio.SDK.EmbedInteropTypes 15.0.27
* CHANGED: StreamJsonRpc 2.0.208
* CHANGED: System.ValueTuple 4.5.0
* NOTE: Our new releases migrated from SourceForge to GitHub Release Page:
https://github.com/3F/vsCommandEvent/releases
Most actual information is still here: https://vsce.r-eg.net/Downloads/
* NOTE: Mirror src on bitbucket is obsolete now.
Please use only GitHub: https://github.com/3F/vsCommandEvent
* NOTE: Here is about SDK10 / SDK15 packages:
https://vssbe.r-eg.net/doc/Usage/#sdk10--sdk15-versions
3F
mentioned this issue
Nov 23, 2020
User Name or E-Mail Address:
Hello all. I have ran into a problem recently and have not been able to fix it. We recently updated to 6.2.0, but the task to export settings is failing with this error message:
Job Error: Exception in Task: Can not load 7-zip library or internal COM error! Message: Your 7-zip library does not support this archive type.
I have tried to uninstall and reinstall visualcron with no luck. I even installed 7-zip in a vain attempt to fix it.
I receive the same error message from manually backing up or using the task.
Can anyone help?
Sponsor
Forum information
Yes the file size is 0. I just sent the email
Yes, I suspected that. For some reason it is 0kB which generates this cryptic error (we will correct this in the future). The question is how this 0kB file was created.
Is your system critical to replace with a backup now?
If not, can you test running the Task again to see if it creates this 0 file again.
Every time I run the task, the 0 byte zip file is created.
I can probably restore the server from a backup this weekend, but that seems like an extreme fix for this problem. Or are you referring to restoring the visualcron settings?
I was just referring to the direct need for restoring the settings.
There is probably some kind of natural explanation for the zero byte file. First, please tell me about your settings (a screenshot from the Task would be great) and also try to export to a local path to see that it works.
I deleted everything off of the server including all settings. I installed a fresh copy, and am using the default task «Backup Settings»
I changed the path to the system default, and the C drive, and it is still exhibiting the same error.
Do you get any error in the file log_serverDATE.txt (log folder of installation)?
Yes I received the same error message manually running the export or running the export from the task
3/21/2013 4:26:38 PM Debug Saving Jobs
3/21/2013 4:26:38 PM Err Error when backuping files, err: Can not load 7-zip library or internal COM error! Message: Your 7-zip library does not support this archive type.
3/21/2013 4:26:38 PM Err Error when exporting settings, err: Can not load 7-zip library or internal COM error! Message: Your 7-zip library does not support this archive type.
Please post screenshot with settings and tell me about your operative system and architecture (32 or 64 bit). Also, please confirm through Task manager if VisualCron runs as 32 or 64 bit.
Please post screenshot with settings and tell me about your operative system and architecture (32 or 64 bit). Also, please confirm through Task manager if VisualCron runs as 32 or 64 bit.
Windows Server 2003 x86
All settings are default except for credentials
DieHardTekkie attached the following image(s):
Try running it locally without Credentials — does that work?
Unfortunately that does not work
Hello Henrik. Billy works for me. We have 10+ servers with VC on it, and this is the only one causing the issue and it started after 6.2.0 was installed.
So, to confirm VC uses 7-Zip for archiving?
And guess what?
6.1.9 works. I’m going to upgrade to 6.2.0 again to test.
Ok, scratch that. This does not work with 6.1.9. The VC does not indicate an error, but the zip files are 0-byte!
Yep, in the log even on 6.1.9:
«3/23/2013 6:44:22 PM Err Error when backuping files, err: Can not load 7-zip library or internal COM error! Message: Your 7-zip library does not support this archive type.»
We could not reproduce this on our test system. Could you please tell us more about operating system and if it is 32 or 64 bit?
Henrik please let me know what additional information you require. We can provide remote access into the machine if you need to check something. Do you have an uninstallation tool that we could run? Maybe a file or setting that was not removed when we uninstalled.
We are currently installing a new test machine. What we need to know:
1. operating system
2. architecture (32 or 64 bit)
1. Windows Server 2003
2. 32 bit
We installed a 32 bit Windows 2003 and upgraded it with SP2 and all services packs. We ran the default Export settings Task with success and it created a non-zero file. We tested this with version 6.1.9.
We assume this is related to one of these:
1. not having all updates installed (framework and service packs)
2. install is corrupt in some way (uninstall and re-install)
3. some settings (job, connection etc) causes an error during export
4. you do not have full access to the export location or VisualCron installation directory
If you zip the settings folder and send to support@visualcron.com we will be able to test with your exact settings which can rule out 3. Thank you.
I just sent you the file. Visualcron worked before the update. 6.2.0 installation broke visualcron.
1. The server is fully updated
2. I have uninstalled and reinstalled. Do you have an uninstallation tool that may do a better job at uninstalling?
3. Everything is DEFAULT. We have made no changes from the initial installation. All settings are unchanged
4. I have full access to all network paths in my domain.
I just sent you the file. Visualcron worked before the update. 6.2.0 installation broke visualcron.
1. The server is fully updated
2. I have uninstalled and reinstalled. Do you have an uninstallation tool that may do a better job at uninstalling?
3. Everything is DEFAULT. We have made no changes from the initial installation. All settings are unchanged
4. I have full access to all network paths in my domain.
Thank you for the file. Unfortunately we could not reproduce this. Can you test with latest 6.2.1. if you get same issue? http://neteject.com/down…Cron/VisualCron6.2.1.exe
No special uninstalling should be needed.
-
Import Settings / Export Settings
(General problem solving)
by
Support
2015-06-29T20:12:24Z -
Unable to load jobs
(General problem solving)
by
Support
2019-06-21T02:30:20Z -
Export Settings — .Net Code
(General problem solving)
by
chris.hill@adsigroup.co.uk
2019-03-04T13:06:31Z -
Export list settings?
(General problem solving)
by
Support
2013-02-19T09:56:25Z -
[Solved] Import,Export Settings
(General problem solving)
by
Support
2012-06-25T11:21:32Z
- Remove From My Forums
-
Question
-
Trying to zip and mail files in script component but getting…»Can not load 7-zip library or internal COM error! Message: DLL file does not exist». I have Referenced SevenZipSharp and 7-zip.dll and 7z.dll in the code behind. What am I doing wrong. If i
take out the zipping code everything works fine. I see excel files in my mailbox.
Answers
-
Hello,
Follow the link below. It may help you.
http://sevenzipsharp.codeplex.com/discussions/54207/
-
Marked as answer by
Monday, July 9, 2012 8:54 AM
-
Marked as answer by
Хорошо, теперь я постараюсь объяснить свою проблему как можно больше. Я хочу использовать популярный алгоритм сжатия 7zip в моем проекте С#.
Пакет NuGet для 7zip уже есть.
Теперь, когда я устанавливаю страницу 7zip https://www.nuget.org/packages/SevenZipSharp/0.64 .0 он устанавливается нормально, но выдает ошибку, когда я пытаюсь запустить
An unhandled exception of type 'SevenZip.SevenZipLibraryException' occurred in SevenZipSharp.dll
Additional information: Can not load 7-zip library or internal COM error! Message: failed to load library
Поэтому я решил добавить файл DLL вручную, и я получаю эту ошибку ниже
---------------------------
Microsoft Visual Studio
---------------------------
A reference to 'D:51_doktora tez projesiprogram_crawlerdoktora_tez_projesi_crawler_programExternalDLLs7z_9_38_2015_01_03.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
---------------------------
OK
---------------------------
Хорошо, но я нашел решение, и оно работает таким образом
Сначала установите пакет nuget
И перед тем, как начать вызывать функции, установите путь
SevenZip.SevenZipExtractor.SetLibraryPath("SevenZipSharp.dll");
SevenZip.SevenZipCompressor.SetLibraryPath("SevenZipSharp.dll");
Хорошо, второй вопрос, который также интересен
Я хотел использовать последнюю версию DLL-файла 7zip. Итак, загрузите его с официального сайта: https://sourceforge.net/projects/sevenzip. /файлы/7-Zip/9.38/
Скачал MSI, установил и получил 64-битный dll-файл. Однако, когда я пытаюсь сослаться на этот файл, происходит сбой с сообщением об ошибке выше: Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Однако трюк снова работает
Я устанавливаю пакет NuGet 7zip. Затем перед вызовом функций я устанавливаю эти 2 строки кода, и он использует последнюю версию файла DLL.
SevenZip.SevenZipExtractor.SetLibraryPath("ExternalDLLs/7z_9_38_2015_01_03.dll");
SevenZip.SevenZipCompressor.SetLibraryPath("ExternalDLLs/7z_9_38_2015_01_03.dll");
Поэтому я ищу ответы, почему все это происходит? Почему я не могу напрямую добавить в качестве ссылки файл DLL, хотя трюк работает?
Windows 8.1 64-разрядная версия, Visual Studio 2013, обновление 3, приложение WPF
Часть вашей проблемы, скорее всего, связана с тем фактом, что SevenZipSharp является просто оболочкой для 7z.dll, которая, насколько мне известно, является dll C++. На странице проекта для SevenZipSharp также упоминается, что можно использовать любую совместимую dll, которую необходимо указать:
Для работы SevenZipSharp требуется родная библиотека 7-zip. Вы можете указать путь к dll 7-zip (7z.dll, 7za.dll и т. д.) в LibraryManager.cs во время компиляции, в app.config или с помощью метода SetLibraryPath() во время выполнения. + «7z.dll» — это путь по умолчанию. Для 64-битных систем необходимо использовать 64-битные версии этих библиотек. 7-zip поставляется с 7z.dll, которая используется для всех операций архивирования (обычно это «Program Files7-Zip7z.dll»). 7za.dll — облегченная версия 7z.dll, поддерживает только архивы 7zip. Вы даже можете создать свою собственную библиотеку с нужными вам форматами из источников 7-zip. SevenZipSharp будет работать со всеми ними.
2
tinstaafl
3 Апр 2015 в 03:58
