error compiling project for customers when i use an external C# assembly

Saeedgh837

Client
Регистрация
09.04.2019
Сообщения
56
Благодарностей
1
Баллы
8
hi there
i have added an external c# library to my project and it works fine in project maker and also in zennoposter
but when i upload the project for my customer in zenno user area
their bot wont start and getting error compiling the project
 

Вложения

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
Send this library to your customers as well. And they have to put it in External Assemblies folder just like you did.
 

Saeedgh837

Client
Регистрация
09.04.2019
Сообщения
56
Благодарностей
1
Баллы
8
Send this library to your customers as well. And they have to put it in External Assemblies folder just like you did.
thanks so much lokiys
,Got the Problem Resolved.
for those who dont know:
the External Assemblies folder is in the Zennoposter OR Zennobox folder which is the installation Folder of the app.
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
41
Баллы
28
So, I have a similiar problem. Was added one lib Json to GAC, and also this .dll was transferred to client's dir but it can't to compile when in my zennoposter it's works fine. Also use this guide en:template-publication [ZennoLab] but encountered with same behivor.
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
41
Баллы
28
Check logs to find out what exactly is the problem. From what you wrote is not possible to tell.
[2023-11-25 18:57:21.5240]|1||CurrentDomain UnhandledException
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at ZennoLab.GlobalControls.Helpers.SyntaxEditorHelper.InitThemes()
at ZennoLab.ZennoPoster.UI.MainFormLoader.w3rL3NPZPjIfR1FHeip()
at ZennoLab.ZennoPoster.UI.MainFormLoader.Prepare()
at ZennoLab.ZennoPoster.Program.NxMShiYaYTUc5fRXDr()
at ZennoLab.ZennoPoster.Program.Start(String[] args)
at ZennoLab.ZennoPoster.Program.oUI6m8Lso(String[] )

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

PrivateMemorySize: 74 MB WorkingSet: 114 MB
Newtonsoft.Json added with ExternalAss. and with included libs like describe in guide above
C:\Zennolab\EN\ZennoBox V7\7.7.7.0\Progs\ExternalAssemblies - files here


Message: "MSB0001: Internal MSBuild Error: Type information for Microsoft.Build.Utilities.ToolLocationHelper was present in the whitelist cache as Microsoft.Build.Utilities.ToolLocationHelper, Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b04f5f7f11d41a3a but the type could not be loaded. unexpectedly null"
2
2023-11-25 19:49:19.7166|WARN|ZennoLab.LogLibrary.InternalError|**prokjct_name**|Error occurred in module "Error compiling the project"
Message: ""
Error in zennobox, in my zennoposter works fine

zennobox report:
Additional software:

Visual C++ redistributable 2008: Not installed
Visual C++ redistributable 2010 (x86): Not installed
Visual C++ redistributable 2010 (x64): Not installed
Visual C++ redistributable 2013 (x86): Installed
Visual C++ redistributable 2013 (x64): Installed
Visual C++ redistributable 2015 (x86): Not installed
Visual C++ redistributable 2015 (x64): Not installed
Visual C++ redistributable 2017 (x86): Not installed
Visual C++ redistributable 2017 (x64): Not installed
Visual C++ redistributable 2015-2019 (x86): Installed
Visual C++ redistributable 2015-2019 (x64): Installed
[2023-11-25 20:10:11.2724]|59|ProjectProcessingThread|CompileToMemoryResults prepare errors. Error string = error CS1705: "Assembly 'Newtonsoft.Json' with identity 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'".

--------------------------------------------------------------------------------
[2023-11-25 20:10:11.2724]|59|ProjectProcessingThread|CompileToMemoryResults prepare errors. Error string = C:\Users\Administrator\AppData\Local\Temp\2\xt4nhgc4\xt4nhgc4.63.cs(35,24) : error CS1705: "Assembly 'Newtonsoft.Json' with identity 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'". [Row: 35; Column: 24]

--------------------------------------------------------------------------------
[2023-11-25 20:10:11.2724]|59|ProjectProcessingThread|CompileToMemoryResults prepare errors. Error string = C:\Users\Administrator\AppData\Local\Temp\2\xt4nhgc4\xt4nhgc4.63.cs(35,16) : error CS1705: "Assembly 'Newtonsoft.Json' with identity 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'". [Row: 35; Column: 16]

-

--------------------------------------------------------------------------------
[2023-11-25 20:10:11.2724]|59|ProjectProcessingThread|CompileToMemoryResults prepare errors. Error string = C:\Users\Administrator\AppData\Local\Temp\2\xt4nhgc4\xt4nhgc4.62.cs(47,1) : warning CS0162: "Unreachable code detected". [Row: 47; Column: 1]

--------------------------------------------------------------------------------
[2023-11-25 20:10:11.2724]|59|ProjectProcessingThread|CompileToMemoryResults prepare errors. Error string = C:\Users\Administrator\AppData\Local\Temp\2\xt4nhgc4\xt4nhgc4.15.cs(42,1) : warning CS0162: "Unreachable code detected". [Row: 42; Column: 1]

--------------------------------------------------------------------------------
[2023-11-25 20:10:11.3036]|59|ProjectProcessingThread|Failed to clear files
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NewNormalizePath(String path, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at ZennoLab.AssemblyCompiler.Compilation.gtxY4oJi95u(String , String[] , List`1 , CodeType , Boolean , Int32 )
--------------------------------------------------------------------------------
Without this Json lib - works fine on both system, so how could I use this json lib on my client's zennobox?
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
Do You have that same zenno version as zennobox? Can you try v7.7.3.0 ?
It looks like some library conflicts. Zenno also Newtonsoft.Json lib by default, So I guess that will be a problem there.
@VladZen after weekend can tell more I guess.

If you your project dont heavily use Newtonsoft.Json I would try to use default zenno way working with jsons.
Another way is try different Newtonsoft.Json lib. version
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
41
Баллы
28
Do You have that same zenno version as zennobox? Can you try v7.7.3.0 ?
It looks like some library conflicts. Zenno also Newtonsoft.Json lib by default, So I guess that will be a problem there.
@VladZen after weekend can tell more I guess.

If you your project dont heavily use Newtonsoft.Json I would try to use default zenno way working with jsons.
Another way is try different Newtonsoft.Json lib. version
What's default zenno way to working with json? Now I using regex but it's temporary bad decision for my purposes.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
  • Спасибо
Реакции: Besedi

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113
Newtonsoft.Json added with ExternalAss. and with included libs like describe in guide above
C:\Zennolab\EN\ZennoBox V7\7.7.7.0\Progs\ExternalAssemblies - files here




Error in zennobox, in my zennoposter works fine

zennobox report:



Without this Json lib - works fine on both system, so how could I use this json lib on my client's zennobox?
It seems there is something wrong with newtonjson dll version, I would advise to use lower than 13.0.0.0.
or with zennobox version (not matching zennoposter version)
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
41
Баллы
28
It seems there is something wrong with newtonjson dll version, I would advise to use lower than 13.0.0.0.
or with zennobox version (not matching zennoposter version)
Tried ver 6.0.3, 12.0.3, 13.0.3, any of these works on zennoposter on localhost and no one works on zennobox on the server.
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
41
Баллы
28
It seems there is something wrong with newtonjson dll version, I would advise to use lower than 13.0.0.0.
or with zennobox version (not matching zennoposter version)
Tried ver 6.0.3, 12.0.3, 13.0.3, any of these works on zennoposter on localhost and no one works on zennobox on the server
Or if you just need to work with json then you can use cubes
Посмотреть вложение 114602
If be honest, i don't know how this cube works, he is return nothing, so what he actually do?? And I write C# code and don't want using additional "Bad behavior" action
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113
Tried ver 6.0.3, 12.0.3, 13.0.3, any of these works on zennoposter on localhost and no one works on zennobox on the server

If be honest, i don't know how this cube works, he is return nothing, so what he actually do?? And I write C# code and don't want using additional "Bad behavior" action
Check C# thread culture value in ZennoBox.
It must be the same as in your ZennoPoster
C#_thread culture.png


P.S. don't know why you dislike JSON cube, it's also based on newtojson dll which you use.
it just parses json code and output data to automatic json variables
 

Кто просматривает тему: (Всего: 5, Пользователи: 0, Гости: 5)