I am facing problem to instal Xamarin in my Mac machine. It's giving problem in monotouch framework installation.
I have down loaded from http://xamarin.com and
down loaded file name is : XamarinInstaller.dmg
My Mac book specifications : lion 10.8.2
Please help me out..
I am getting below error.
Mono Framework installation failed with more than one exception (Attempt #Mono Framework)
Some installation errors are present.
Exception type: System.AggregateException
Message: Some installation errors are present.
Exception type: Xamarin.Web.Installer.InstallException
Message: Failed to attach DMG image '/Users/abcd.is/Library/Caches/XamarinInstaller/Universal/downloads/MonoFramework-MDK-2.10.12.macos10.xamarin.x86.dmg'. Error code 1.
at Xamarin.Web.Installer.MacInstallationArchiveHandler.MountDmg (System.String path) [0x00000] in :0
at Xamarin.Web.Installer.MacInstallationArchiveHandler.InstallDmg (System.String path, Boolean needsPrivileges) [0x00000] in :0
at Xamarin.Web.Installer.Installer.InstallationArchiveHandler.Install (System.String path, Boolean needsPrivileges) [0x00000] in :0
Exception type: Xamarin.Web.Installer.InstallException
Message: Failed to attach DMG image '/Users/abcd.is/Library/Caches/XamarinInstaller/Universal/downloads/MonoFramework-MDK-2.10.12.macos10.xamarin.x86.dmg'. Error code 1.
Actually, restarting the installer worked for me.
Related
I am trying to run a Xamarin test application on a fresh install of Ubuntu 20.04.2
On a windows 10 machine, I am cloning this repo:
https://github.com/jsuarezruiz/xamarin-forms-gtk-movies-sample
Compile it in Visual Studio 2019, it runs perfectly on android and windows GTK
Then I copy the contents of bin/Debug folder to my Linux machine and try running it with mono, it throws an exception:
Unhandled Exception:
System.DllNotFoundException: libglib-2.0-0.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) GLib.Marshaller.g_utf16_to_utf8(char*,intptr,intptr,intptr,intptr&)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00034] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at GLib.Global.set_ProgramName (System.String value) [0x00001] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at Gtk.Application.SetPrgname () [0x0000d] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Gtk.Application.Init () [0x00001] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Movies.GTK.Program.Main (System.String[] args) [0x00043] in <87211febe55c459f869a2b0842e037c3>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libglib-2.0-0.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) GLib.Marshaller.g_utf16_to_utf8(char*,intptr,intptr,intptr,intptr&)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00034] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at GLib.Global.set_ProgramName (System.String value) [0x00001] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at Gtk.Application.SetPrgname () [0x0000d] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Gtk.Application.Init () [0x00001] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Movies.GTK.Program.Main (System.String[] args) [0x00043] in <87211febe55c459f869a2b0842e037c3>:0
Obviously missing a "libglib-2.0-0.dll", which I am not sure how to install on Linux and where mono searches for it.
So far I tried installing mono-devel, mono-complete, gtk-sharp2, libglib2.0-dev
After searching through mono logs I noticed that it's trying to access windows-specific dlls, so I tried setting library reference parameter "Copy Local" to false on these libraries:
atk-sharp
gdk-sharp
glade-sharp
glib-sharp
gtk-dotnet
gtk-sharp
pango-sharp
And it worked on ubuntu 18.04.3 LTS
I have searched after a solution to build a windows installer on MacOS with squirrel, but without any luck.
I have successfully installed mono via my terminal.
Version 6.4.0.198.
Versions:
electron: ^4.2.5
electron-builder: ^20.41.0
electron-builder-squirrel-windows: ^20.44.0
I run the command npm run build:win, after a bit of packaging this error comes up
Error: Exit code: 255. Command failed: mono /Users/admin/Library/Caches/electron-builder/Squirrel.Windows/Squirrel.Windows-1.9.0/Update-Mono.exe --releasify /Users/admin/Desktop/myTestBuild/dist/squirrel-windows/mytestbuild-1.0.0-full.nupkg --releaseDir /Users/admin/Desktop/myTestBuild/dist/squirrel-windows
2019-10-05 18:55:36> Unhandled exception: System.ComponentModel.DataAnnotations.ValidationException: Description is required.
at NuGet.Manifest.Validate (NuGet.Manifest manifest) [0x000b1] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.Manifest.ReadFrom (System.IO.Stream stream, NuGet.IPropertyProvider propertyProvider, System.Boolean validateSchema) [0x0007b] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.Manifest.ReadFrom (System.IO.Stream stream, System.Boolean validateSchema) [0x00006] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.LocalPackage.ReadManifest (System.IO.Stream manifestStream) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage.EnsureManifest () [0x00050] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage..ctor (System.String filePath, System.Boolean enableCaching) [0x00049] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage..ctor (System.String filePath) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0
at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x0000d] in <64ead1da9ab54e29ae45ecd50faea709>:0
Hope someone can help me, have a great day.
Finally found a solution!
your "description" in package.json cannot be empty. That is why it says
Description is required. at NuGet.Manifest.Validate........
This should definitely be added to docs of electron-builder and/or electron-builder-squirrel-windows.
Now,I have updated my Xamarin.ios to 7.0.x It is giving error that, I am already having xcode 5
Error: A valid Xcode installation could not be found. If your copy of Xcode is
installed to a non-standard prefix, please specify the location in MonoDevelop's
Preferences under 'SDK Locations'. (Scrapboom.iPhone)
I have updated Xcode to 5.0 for ios7 and running application in monodevelop but application is not running it is giving,
warning on simulator:
warning MT1201: Could not load the simulator: dlopen(Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient, 1): image not found
warning on device:
warning MT1003: Could not kill the application 'com.scrapboom.iphone'. You may have to kill the application manually.
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.DirectoryNotFoundException: Directory 'Platforms/iPhoneOS.platform/DeviceSupport' not found.
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Device.get_DeveloperImagePath () [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Device.MountDeveloperImage () [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Installer.FindApplication (MonoTouch.Installation.Device d, System.String appId) [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Installer+<LaunchApplication>c__AnonStorey1A.<>m__22 (MonoTouch.Installation.Device d) [0x00000] in <filename unknown>:0
You can set the new XCode location in Xamarin.Studio in the Preferences:
Xamarin Studio > Preferences... > Projects > SDK Locations > Apple
If you don't have the green check marks, set the location targetting your new XCode 5 installation (usually /Applications/XCode.App)
I had a similar issue after updating to Xcode6. What helped me was installing all updates for Xamarin Studio over the beta channel. Go to Xamarin Studio > Check for Updates ... an then choose beta instead of stable
I am trying to build a xamarin component.
I have a created a SomeLibrary.dll from a Binding project.
Using this SomeLibrary.dll and the Component Template(https://components.xamarin.com/guidelines
), I have generated a SomeLibrary-1.0.xam component.
I executed this command to install the SomeLibrary component onto Xamarin Studio(so I can test the component before submitting it to the store):
mono xamarin-component.exe install /Users/somedeveloper/Desktop/XamarinComponent/component-template-master/SomeLibrary-1.0.xam
(recommended by http://forums.xamarin.com/discussion/5640/test-component-packaging)
Now, I am trying to test my SomeLibrary component. I created a brand new project, added the component to my project, wrote a couple of lines that uses SomeLibrary api, and got the following error as I build and run.
I am lost and confused here, any idea, suggestions would be great.^^.
The main thing that I see from the error is:
error MT2002: Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
It seems to be complaining about some sort of PublicKeyToken. What is this? Do I have to generate a PublicKeyToken for my SomeLibrary component? If so, how do I generate a PublicKeyToken.
thanks and appreciate any help, suggestion, or comments !^_^!,
Full Error Log
Building: SomeLibraryComponent (Debug|iPhone)
Detecting signing identity...
Provisioning Profile: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Signing Identity: "iPhone Developer: XXXXXXXXXX (ALKJLKJSLDKJFLJ)"
App ID: "SDLFJLKSDJF.SomeLibrarycomponent"
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.2.3/bin/mcs /noconfig "/r:/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib "/out:/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Users/somedeveloper/projects/SomeLibraryComponent/Components/SomeLibrary-1.0/lib/ios/SomeLibrary.iOS.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__" /t:exe "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/Main.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/AppDelegate.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.designer.cs"
Compilation succeeded - 1 warning(s)
/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.cs(48,24): warning CS0672: Member `SomeLibraryComponent.SomeLibraryComponentViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)' overrides obsolete member `MonoTouch.UIKit.UIViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)'. Add the Obsolete attribute to `SomeLibraryComponent.SomeLibraryComponentViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)'
/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll (Location of the symbol related to previous warning)
Build complete -- 0 errors, 1 warning
Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/obj/iPhone/Debug/mtouch-cache" --nomanifest --nosign -dev "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/somedeveloper/projects/SomeLibraryComponent/Components/SomeLibrary-1.0/lib/ios/SomeLibrary.iOS.dll" -debug -sdk "6.1" -targetver "6.0" --abi=armv7 "-v" "-v" "-v" "--compiler:clang++" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe"
Xamarin.iOS 7.0.1.4 (4cfca2f) Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
Linking assembly /Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe into /Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/obj/iPhone/Debug/mtouch-cache/PreBuild
error MT2002: Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, Mono.Linker.LinkContext& context, System.Collections.Generic.List`1& assemblies) [0x00000] in <filename unknown>:0
at MTouch.LinkAssemblies (System.String main, System.Collections.Generic.List`1& assemblies, System.String output_dir, Mono.Linker.LinkContext& link_context) [0x00000] in <filename unknown>:0
at MonoTouch.Application.ManagedLink () [0x00000] in <filename unknown>:0
at MonoTouch.Application.ProcessAssemblies () [0x00000] in <filename unknown>:0
at MonoTouch.Application.BuildApp () [0x00000] in <filename unknown>:0
at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0
at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0
at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
It has nothing do to with public key (tokens).
From the first part of your log it seems that your .dll is named "SomeLibrary.iOS.dll". However the error message is looking for "SomeLibrary", not "SomeLibrary.iOS".
There must be a mismatch between the file name and the internal assembly name.
I got stuck here by copying a project and renaming the project file from Foundation.Mobile to Mobile. I kept on getting a "Component failed to resolve assembly". The answer was to change the actual assembly name in Project Properties.
Uninstall package "SomeLibrary" and install it again via Nuget Package Manager.
I was getting this same error (Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'), and that was the solution in my case.
I have seen a previous SO Question here that discusses a similar (identical?) issue, but there was no answer there that could satisfy my problem.
My Environment:
MonoDevelop 3.0.3.2
Installation UUID: ????????
Runtime:
Mono 2.10.9 (tarball)
GTK 2.24.10
GTK# (2.12.0.0)
Package version: 210090011
Mono for Android not installed
Apple Developer Tools:
Xcode 4.3.3 (1178)
Build 4E3002
Monotouch: 5.2.12
Build information:
Release ID: 30003002
Git revision: 7bf6ac0ca43c1b12703176ad9933c3484c05c84c-dirty
Build date: 2012-06-16 04:36:10+0000
Xamarin addins: 62ad7268d38c2ece7e00dc32960bd3bdab8fec38
Operating System:
Mac OS X 10.7.4
Darwin NEWTON.local 11.4.0 Darwin Kernel Version 11.4.0
Mon Apr 9 19:32:15 PDT 2012
root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
My Code (Ping & PingResponse are DTOs in my own ServiceModel library):
Ping request = new Ping { LoginInfo = new IMDSSWebService_SS.ServiceModel.ClientLoginInfo { UserName="guest", Password="guest", ClientPlatform="iOS", ClientVersion="1.5", InstanceUID="uid1"} };
var response = _appDel.ServiceClient.Send<IMDSSWebService_SS.ServiceModel.PingResponse>(request);
ServiceStack Libraries:
ServiceStack.Common.Monotouch.dll (built from git src)
ServiceStack.Interfaces.Monotouch.dll (built from git src)
ServiceStack.Text.Monotouch (built from git src)
Exception:
System.ExecutionEngineException has been thrown
Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1:GetParseFn ()' while running with --aot-only.
System.ExecutionEngineException: Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1:GetParseFn ()' while running with --aot-only.
at ServiceStack.Text.Json.JsonReader.GetParseFn (System.Type type) [0x00000] in :0
at ServiceStack.Text.Json.JsonTypeSerializer.GetParseFn (System.Type type) [0x00000] in :0
at ServiceStack.Text.Common.TypeAccessor.Create (ITypeSerializer serializer, ServiceStack.Text.TypeConfig typeConfig, System.Reflection.PropertyInfo propertyInfo) [0x00000] in :0
at ServiceStack.Text.Common.DeserializeType`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseMethod (ServiceStack.Text.TypeConfig typeConfig) [0x00000] in :0
at ServiceStack.Text.Common.JsReader`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseFn[PingResponse] () [0x00000] in :0
at ServiceStack.Text.Json.JsonReader`1[IMDSSWebService_SS.ServiceModel.PingResponse]..cctor () [0x00000] in :0
I did try calling JsConfig.RegisterForAot(), but that didn't change anything. I also tried various permutations of Link SDK Only, Link All, Link None, but all failed either with the above exception, or didn't build at all, see below.
Simulator/Debug - Works Fine
Simulator/Release - Works Fine
iPhone/Debug - Exception Above
iPhone/Release - Doesn't even build. (will create a separate SO question)
I added a Type Registration function to ServiceStack.Text.Monotouch.JsConfig.cs that lets you register your custom DTOs for AOT compilation. There is a pull request to the ServiceStack mainline, so this should make it in soon.
JsConfig Code Change
You need to register all of your Response DTO Types that aren't standard C# types (string, int, etc.). My PingResponse DTO includes a StatusEnum Enumeration, so I have to register both before I can Parse a response without throwing a JIT Exception. Using the patch above, I would call the following in my Monotouch App:
JsConfig.RegisterForAot();
JsConfig.RegisterTypeForAot<PingResponse>();
JsConfig.RegisterTypeForAot<StatusEnum>();
This could get really messy for Complicated DTOs. Hopefully someone (maybe I will if time permits) can come up with an automated way of discovering all types in your DTO that should be registered? Maybe reflection?