can't add .dll to zenno

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
So, tried to install MimeKit.dll and MailKit.dll, it's require 2.0 version of netstandard for properly working, but when I added a 2.0 version I catch error from selfown zenno.

Type Time Message
20:54:10 Assembly connection to project C:\Users\user\Downloads\mailkit\mailkit\MimeKit.3.2.0\lib\netstandard2.0\MimeKit.dll is not a .Net assembly or it is not possible to access the assembly

Type Time Message
20:54:10 "Connecting assembly to project System.Exception: An exception of type 'System.Exception' was thrown."
at ZennoLab.ProjectMaker.Controls.ProjectEditor.ProjectBar.StaticBlockSettings.GACReferences.VJg3aEREqk(Object , OkButtonClickArgs )"


In other hand, when using netstandard 5.0\6.0, it's didn't have any execption but zenno require version 2.0 when code started:
Code compilation Error in action "CS0012" "The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'." . [Line: 2; Column: 14] :be:

How can I using mailkit on zenno?
 

Yuriy Zymlex

Moderator
Команда форума
Регистрация
24.10.2016
Сообщения
6 373
Благодарностей
3 297
Баллы
113
Install the Developer Pack for .NET Framework 4.6.2: https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net462-developer-pack-offline-installer.
Next, in a third-party IDE (Visual Studio, Rider), create a .NET Framework 4.6.2 console project, add the required libraries via NuGet, build in Release and from the resulting dlls remove the dependencies that ZP already has in the Progs folder, for example Newtonsoft.Json.dll , netstandard.dll etc. (otherwise a conflict), then move the remaining dlls to ExternalAssemblies (check the version in the path and the version of your poster). You may get a significant number of dlls (there are dependencies), all of them will need to be added to the GAC.
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
Install the Developer Pack for .NET Framework 4.6.2: https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net462-developer-pack-offline-installer.
Next, in a third-party IDE (Visual Studio, Rider), create a .NET Framework 4.6.2 console project, add the required libraries via NuGet, build in Release and from the resulting dlls remove the dependencies that ZP already has in the Progs folder, for example Newtonsoft.Json.dll , netstandard.dll etc. (otherwise a conflict), then move the remaining dlls to ExternalAssemblies (check the version in the path and the version of your poster). You may get a significant number of dlls (there are dependencies), all of them will need to be added to the GAC.
Did that, get some error, in example one of them:
Code compilation Error in action "CS0426" "Error in using directives. The type name 'CodePages' does not exist in the type 'Encoding'". [Line: 3; Column: 28]

System.Text.Encoding.CodePages.dll added to External Assemblies with all other dependencies that require by MailKit. Also, it's added to GAC and in the "using directives"
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
Последнее редактирование:

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
Install the Developer Pack for .NET Framework 4.6.2: https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net462-developer-pack-offline-installer.
Next, in a third-party IDE (Visual Studio, Rider), create a .NET Framework 4.6.2 console project, add the required libraries via NuGet, build in Release and from the resulting dlls remove the dependencies that ZP already has in the Progs folder, for example Newtonsoft.Json.dll , netstandard.dll etc. (otherwise a conflict), then move the remaining dlls to ExternalAssemblies (check the version in the path and the version of your poster). You may get a significant number of dlls (there are dependencies), all of them will need to be added to the GAC.
Build, added all dependieces:
using Mono.Data.Sqlite;
using Microsoft.VisualStudio.CodeCoverage;
using NUnit.Engine;
using NUnit.Framework;
using System.Data.SQLite;
using UnitTests;
using MailKit.Net.Smtp;
using MailKit;
using MimeKit;

These, use in unittest, all others already exist in progs...
Still getting a same error
 
Последнее редактирование:

Yuriy Zymlex

Moderator
Команда форума
Регистрация
24.10.2016
Сообщения
6 373
Благодарностей
3 297
Баллы
113

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
NewUpdate:


1. Added DLL to \ExternalAssemblies contained in \Progs (newer version)

2. When collecting "Directives with using " Zenno does not see this lib


Error when using code from package with dependency:

Execute the CSharp OwnCode action. [Line: 16; Column: 0] Failed to load file or assembly "MimeKit, Version=3.2.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814" or one of its dependencies. The found manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28

Besedi

Client
Регистрация
04.03.2019
Сообщения
234
Благодарностей
40
Баллы
28
After compilation, in total the it has 105 DDLs. I added only those that are not in the \Progs, but it still gives an error.
Does this mean that I need to add all 105 libraries to the GAC?
 

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