I have created a bindings project with Visual Studio on the Mac, it has the output files from Objective Sharpie and linked libraries as you can see in this repo:
bitbucket.org/mlang74/twiliovoice.ios/src
When the project is built the system is confused about the enumerations, as if they don't even exist.
- error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
- error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
- error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)
It seems there must be some simple solution to get the compiler to recognize the StructsAndEnums.cs file and build a dll properly. Any ideas? Is this a project code or setup problem, or a problem with my computer configuration? Can someone open and build this project to verify?
Here is the full build output that I get on my Mac:
Building: TwilioVoice.iOS (Debug)
Build started 11/8/2017 8:32:49 PM.
__________________________________________________
Project "/Users/michaellang/TwilioVoice.iOS/TwilioVoice.iOS.csproj" (Build target(s)):
Target _CollectBundleResources:
CollectBundleResources Task
BundleResources: <null>
OptimizePropertyLists: False
OptimizePNGs: False
ProjectDir: /Users/michaellang/TwilioVoice.iOS
ResourcePrefix: Resources
Target _CreateEmbeddedResources:
CreateEmbeddedResources Task
BundleResources:
Prefix: monotouch
Target _GenerateBindings:
BTouchEmitDebugInformation: false
BTouch Task
BTouchToolPath: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/
BTouchToolExe: btouch-native
AdditionalLibPaths: <null>
AllowUnsafeBlocks: True
ApiDefinitions:
ApiDefinition.cs
ApiDefinitions.cs
StructsAndEnums.cs
BaseLibDll: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
CompilerPath: <null>
CoreSources: <null>
DefineConstants: __UNIFIED__;__MOBILE__;__IOS__;DEBUG;
EmitDebugInformation: False
ExtraArgs: <null>
GeneratedSourcesDir: obj/Debug/ios/
GeneratedSourcesFileList: obj/Debug/ios/sources.list
Namespace: <null>
NativeLibraries: <null>
NoStdLib: False
OutputAssembly: <null>
ProcessEnums: False
ProjectDir: /Users/michaellang/TwilioVoice.iOS
References:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
Resources: <null>
Sources: <null>
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/btouch-native /v /baselib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /unsafe /d:"__UNIFIED__;__MOBILE__;__IOS__;DEBUG" /Users/michaellang/TwilioVoice.iOS/ApiDefinition.cs /Users/michaellang/TwilioVoice.iOS/ApiDefinitions.cs /Users/michaellang/TwilioVoice.iOS/StructsAndEnums.cs -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /tmpdir:/Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/ /sourceonly:/Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/sources.list /target-framework=Xamarin.iOS,v1.0
Target _PrepareNativeReferences:
PrepareNativeReferences Task
IntermediateOutputPath: obj/Debug/
NativeReferences: <null>
Target _CompressNativeFrameworkResources:
Skipping target "_CompressNativeFrameworkResources" because it has no inputs.
Target _CompressObjCBindingNativeFrameworkResources:
Skipping target "_CompressObjCBindingNativeFrameworkResources" because it has no inputs.
Target _GenerateCompileInputs:
/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3163,5): warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
Done building target "_GenerateCompileInputs" in project "TwilioVoice.iOS.csproj".
Target GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/4.5/csc.exe /noconfig /unsafe+ /nowarn:2008 /nostdlib+ /errorreport:prompt /warn:4 /define:__UNIFIED__;__MOBILE__;__IOS__;DEBUG /errorendlocation /preferreduilang:en-US /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /debug+ /debug:portable /optimize- /out:obj/Debug/TwilioVoice.iOS.dll /resource:libcrypto.a /resource:libssl.a /resource:libTwilioClient.a /target:library /utf8output Properties/AssemblyInfo.cs libcrypto.linkwith.cs libssl.linkwith.cs libTwilioClient.linkwith.cs Structs.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/ObjCRuntime/Libraries.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/ObjCRuntime/Messaging.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/Constants.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCConnectionDelegate.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCDeviceDelegate.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCPresenceEvent.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs "/var/folders/1y/7trvx64j5n5ctxhnzq44cpp40000gn/T/Xamarin.iOS,Version=v1.0.AssemblyAttributes.cs"
obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs(206,18,206,35): error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs(254,18,254,31): error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs(83,36,83,46): error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)
Done building target "CoreCompile" in project "TwilioVoice.iOS.csproj" -- FAILED.
Done building project "TwilioVoice.iOS.csproj" -- FAILED.
Build FAILED.
/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3163,5): warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs(206,18,206,35): error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs(254,18,254,31): error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs(83,36,83,46): error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)
1 Warning(s)
3 Error(s)
Time Elapsed 00:00:01.43
---------------------- Done ----------------------
Build: 3 errors, 1 warning