The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard

575 views
Skip to first unread message

Ashok Darade

unread,
Aug 4, 2021, 1:27:22 AM8/4/21
to jni...@googlegroups.com
Hi All,

I have created net standard DLL (not a dot net framework) and I am trying to use it in the java application. but while execute build.cmd command i am getting below error
"The type 'System.Object' is defined in an assembly
that is not referenced. You must add a reference to assembly 'netstandard
,"

can anyone please help me what is the solution for that?

Please see the below error message.

Note: I can call Dot Net framework DLL in the java application successfully.

D:\Java\Java_JNI_Lib\bin>.\proxygen.exe "D:\CSharp Code\DotNetStandarLib\DotNetStandarLib\bin\Debug\netstandard2.0\DotNetStandarLib.dll" -wd "D:\Java\Standard"
jni4net.proxygen - Copyright (C) 2009 Pavel Savara - licensed under GPLv3
will generate JVM dotnetstandarlib.mymathclass
proxygen done
D:\Java\Java_JNI_Lib\bin>cd D:\Java\Standard
D:\Java\Standard>.\build.cmd
compile classes
DotNetStandarLib.j4n.jar
DotNetStandarLib.j4n.dll
clr\dotnetstandarlib\MyMathClass.generated.cs(28,35): error CS0012: The type 'System.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'.
d:\CSharp Code\DotNetStandarLib\DotNetStandarLib\bin\Debug\netstandard2.0\DotNetStandarLib.dll: (Location of symbol
related to previous error)

Thank you
Ashok

Pavel Šavara

unread,
Aug 4, 2021, 1:29:49 AM8/4/21
to jni4net
Jni4net does not support dotnet core.

--
--
You received this message because you are subscribed to jni...@googlegroups.com
http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
http://jni4net.sf.net/

---
You received this message because you are subscribed to the Google Groups "jni4net" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jni4net+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jni4net/CAAXqVi8P373-69Ks4tqctSyn0KRy56gQC80TQ4RNYbms2FxWQQ%40mail.gmail.com.

Ashok Darade

unread,
Aug 4, 2021, 5:10:23 AM8/4/21
to jni...@googlegroups.com
Thank you so much Pavel Savara for your reply.

I would like to Jni4Net only support DotNet Framework?

Is there any other way we can use NetStandard DLL in Java?

Thanks & Regards,
Ashok

Reply all
Reply to author
Forward
0 new messages