Hello guys,
I am writing here, because we have one problem occurring whatever we try to do:
The Problem:
Cannot create an instance of the following .NET Framework object: assembly XXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97113f8bddac1f33, type XXXX.ClassA
* It triggers in the function below
I made my own .NET Framework class library and generated XXXX.dll.
I made everything in my BC app:
In Codeunit:
dotnet
{
assembly(XXXX)
{
version = '1.0.0.0';
culture = 'neutral';
PublicKeyToken = '97113f8bddac1f33';
type(XXXX.ClassA; ClassA)
{ }
}
}
as well as in function:
procedure CallRESTWebService()
var
ClassAVar: DotNet ClassA;
begin
UnicarsSetup.Get();
ClassAVar:= ClassAVar.ClassA(); //triggers the problem
//...
end;
Also in settings.json:
"al.assemblyProbingPaths": [
"./.netpackages",
"C:/Program Files/Microsoft Dynamics 365 Business Central/180/Service/Add-ins"]
* The dll security settings are in Full Control it is uploaded in each path included in settings.json file
* Service is restarted every time
* as you can see in above code I have publicKey, Version.
I tried with making the Constructor of the class, not using the default. The app can be published without problems.
I would be grateful for any kind of help!
0
Answers
See https://forum.mibuso.com/discussion/76507
This topic will be deleted after a week.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!