Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Compiler Error: FileNotFoundException: netstandard (8.6.2.0) #405

Closed
nico-csp opened this issue Aug 3, 2023 · 4 comments
Closed

Comments

@nico-csp
Copy link

nico-csp commented Aug 3, 2023

Symptom

FileNotFoundException occurred; tool asked to file a ticket.

IKVM Version and Package

I used the ZIP package

 https://github.com/ikvmnet/ikvm/releases/download/8.6.2/IKVM-8.6.2-tools-netcoreapp3.1-win7-x64.zip

The Task

I tried to convert a JAR to a DLL by calling ikvmc.

This was the call and output:

CMD> ikvmc -target:library -out:MyLib.dll -assembly:MyLib -version:6.4.2.4 MyLib-6.4.2.4.jar
IKVM.Tools.Importer (8.6.2+Branch.tags-8.6.2.Sha.854ec19f2c698bf3a9742f6f7eebdde4fc9166c3)
Copyright © 2023 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug

*** INTERNAL COMPILER ERROR ***

PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE

IKVM.Tools.Importer, Version=8.6.2.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58
(...current directory...)
3.1.32 64-bit

System.IO.FileNotFoundException: netstandard
   at IKVM.Reflection.Universe.Load(String refname, Module requestingModule, Boolean throwOnError) in C:\work\ikvm\src\IKVM.Reflection\Universe.cs:line 547
   at IKVM.Tools.Importer.AssemblyResolver.Init(Universe universe, Boolean nostdlib, IList`1 references, IList`1 userLibPaths) in C:\work\ikvm\src\IKVM.Tools.Importer\AssemblyResolver.cs:line 96
   at IKVM.Tools.Importer.IkvmImporterInternal.Compile(String[] args) in C:\work\ikvm\src\IKVM.Tools.Importer\IkvmImporterInternal.cs:line 179
   at IKVM.Tools.Importer.IkvmImporterInternal.Execute(String[] args) in C:\work\ikvm\src\IKVM.Tools.Importer\IkvmImporterInternal.cs:line 112

Question

Could there be a simple workaround for the time beeing?

@wasabii
Copy link
Contributor

wasabii commented Aug 3, 2023

We recommend people simply trying to add a Java library to their .NET application use IkvmReference or MavenReference, as described in the README. The command line options to ikvmc are very long and complicated, and IkvmReference provides them automatically baesd on the build environment.

Otherwise, ikvmc needs a -reference argument for each of the ref assemblies that are part of the target framework; and a -runtime argument pointing to the version of IKVM.Runtime you want the generated assembly to bind to.

@nico-csp
Copy link
Author

nico-csp commented Aug 4, 2023

Thank you! Understood. I will try that instead then. The message "internal compiler error" sounded like a more general problem.

@nico-csp
Copy link
Author

nico-csp commented Aug 4, 2023

When adding the JAR via IkvmReference, it seems to work flawlessly.

So for me, the issue could be closed. Thanks for your support!

Or do you think, the issue should stay open, because "internal compiler error" requires additional treatment in the code?

@wasabii
Copy link
Contributor

wasabii commented Aug 4, 2023

Our poor error messages already have bugs open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants