mono/Embeddinator-4000

error EM0014: Could not find Xamarin.Mac (Xamarin.Mac 5.2.1.12 is required).

core-code opened this issue · 5 comments

Steps to Reproduce

  1. install embeddinator (we've tried 1.) from source 2.) with nuget and 3.) through visual-studio)
  2. run 'objcgen' on a simple DLL that does nothing except returning a string

Expected Behavior

successs

Actual Behavior

error EM0014: Could not find Xamarin.Mac (Xamarin.Mac 4.0.0.215 is required).

Environment

Embeddinator-4000 v0.1 (master: 9cd5d13)

macOS 10.14.6

Visual Studio 8.3.4

Build Logs

mono /Users/julian/Desktop/5/5/packages/Embeddinator-4000.0.4.0/tools/objcgen.exe  /Users/julian/Desktop/5/5/bin/Debug/5.dll   --target=framework --platform=macOS-modern --abi=x86_64 --outdir=/Users/julian/Desktop/1  --debug -c -v
Parsing assemblies...
	Parsed '/Users/julian/Desktop/5/5/bin/Debug/5.dll'
Processing assemblies...
Processing: 1 assemblies
Processing Assembly: 5
Processing Type: Application_MyClass
TypeMapper Register: System.Void .ctor() init
TypeMapper Register: System.String ReturnMimi(System.String) returnMimiInput:
	1 types found
Generating binding code...
Begin Generator
Generating Assembly: 5
Generating Type: Application_MyClass
Generating Method: System.String ReturnMimi(System.String)
Generating Method Impl: System.String ReturnMimi(System.String)
	Generated: /Users/julian/Desktop/1/bindings.h
	Generated: /Users/julian/Desktop/1/bindings-private.h
	Generated: /Users/julian/Desktop/1/bindings.m
	Generated: /Users/julian/Desktop/1/bindings.xml
	Generated: /Users/julian/Desktop/1/embeddinator.h
	Generated: /Users/julian/Desktop/1/glib.h
	Generated: /Users/julian/Desktop/1/mono_embeddinator.h
	Generated: /Users/julian/Desktop/1/mono-support.h
	Generated: /Users/julian/Desktop/1/objc-support.h
	Generated: /Users/julian/Desktop/1/glib.c
	Generated: /Users/julian/Desktop/1/mono_embeddinator.c
	Generated: /Users/julian/Desktop/1/objc-support.m
	Generated: /Users/julian/Desktop/1/Make.config
Compiling binding code...
Found Mono 6.4.0.198 (between 5.4.1.7 and 5.4.1.7)
error EM0014: Could not find Xamarin.Mac (Xamarin.Mac 4.0.0.215 is required).
Debug Log:
Processing: 1 assemblies
Processing Assembly: 5
Processing Type: Application_MyClass
TypeMapper Register: System.Void .ctor() init
TypeMapper Register: System.String ReturnMimi(System.String) returnMimiInput:
Begin Generator
Generating Assembly: 5
Generating Type: Application_MyClass
Generating Method: System.String ReturnMimi(System.String)
Generating Method Impl: System.String ReturnMimi(System.String)

Example Project (If Possible)

i'm trying to generate an objc framework for the simplest possible DLL, it does nothing except return a string. its uploaded here:
https://www.dropbox.com/s/kkbtlfmewrlf2wg/_monoembedding.zip?dl=1

if there is any combination of macOS, Xcode and VisualStudio that is known to work as advertised, please let me know.

Hello,

I'm quite sure you do have Xamarin.Mac, but we would need full logs to see what exact version of the dll you have and that if we need to update the tool to accommodate the newest one.

The easiest way to get exact version information:

  • On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
  • On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.

Then copy/paste the version information (you can use the "Copy Information" button).

Once we have the full info of the system, we can start looking at the fix or at least provide you a workaround.

hello @mandel-macaque

many thanks for your answer. basically we have an app that needs to call a windows DLL ('XLParser') and are currently using Mono from 2015 and the old JIT API mono_runtime_invoke() to do that. however, this causes random freezes under Mojave, so we were looking to update everything to the newest versions and most recent recommendations on how to use a DLL in a Mac app, in hopes of getting rid of that freeze.

as mentioned above i haven't even been able to call a sample DLL that just returns a string yet, so any help there would be much appreciated. here is the info you are looking for:

About Visual Studio:

Visual Studio Community 2019 for Mac
Version 8.3.4 (build 8)
Installation UUID: 2b6d0018-aaa5-4358-986b-fdd85bb79544
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 5.16.1.24 (d16-3 / 08809f5b)

	Package version: 604000198

Mono Framework MDK
Runtime:
	Mono 6.4.0.198 (2019-06/fe64a4765e6) (64-bit)
	Package version: 604000198

NuGet
Version: 5.3.0.6192

.NET Core SDK
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Sdks

.NET Core Runtime
Runtime: Not installed

Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found

Updater
Version: 11

Xamarin.Android
Not Installed

Microsoft Mobile OpenJDK
Java SDK: Not Found

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

we really want to ship an updating with updated mono+embedding as soon as possible and would be happy to purchase paid support to get it working, if available.

The above does not show Xamarin.Mac as being installed on your computer. This is a requirement to have the e4k tool work.