Hello all, let me first say i do enjoy using Xamarin Studio very much and would like to create a few Addins for productivity. When i compile the DateInserter example, it does so just fine, however when I click Run to test it out i'm getting a TON of errors just before it launches the next XS session. Any thoughts?
Please note that there are more errors than this, but this is the gist of it. Also I only have access to the Indy Android license for Xamarin which shouldn't matter since this is just an Add-In specifically for Xamarin Studio v5.7.2 (build 7)
Thank you in advance for any advice on resolving this.
Errors:
INFO [2015-03-25 21:25:08Z]: Starting Xamarin Studio 5.7.2 (build 7) INFO [2015-03-25 21:25:08Z]: Running on Microsoft .NET 4.0.30319.34014 ... INFO [2015-03-25 21:25:09Z]: Found GTK# version 2.12.26 INFO [2015-03-25 21:25:09Z]: Using GTK+ 2.24.22 ... ERROR [2015-03-25 21:25:10Z]: Error reading name for assembly 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Xamarin.iOS.Tasks.Core.dll' in framework 'MonoTouch,Version=v1.0': System.BadImageFormatException: Could not load file or assembly 'Xamarin.iOS.Tasks.Core.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Xamarin.iOS.Tasks.Core.dll' ---> System.BadImageFormatException: Could not load file or assembly 'Xamarin.iOS.Tasks.Core.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Xamarin.iOS.Tasks.Core.dll' at System.Reflection.AssemblyName.nGetFileInformation(String s) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at MonoDevelop.Core.Assemblies.SystemAssemblyService.GetAssemblyNameObj(String file) at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir) ERROR [2015-03-25 21:25:10Z]: Error reading name for assembly 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Xamarin.iOS.Tasks.dll' in framework 'MonoTouch,Version=v1.0': System.BadImageFormatException: Could not load file or assembly 'Xamarin.iOS.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Xamarin.iOS.Tasks.dll' ---> System.BadImageFormatException: Could not load file or assembly 'Xamarin.iOS.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Xamarin.iOS.Tasks.dll' at System.Reflection.AssemblyName.nGetFileInformation(String s) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at MonoDevelop.Core.Assemblies.SystemAssemblyService.GetAssemblyNameObj(String file) at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir)
Posts
Can you be more specific about the errors? The assembly name errors in that log can be ignored.
Note that several changes are need to the sample to make it work with the latest version of the Addin Maker. I've asked our docs team to update the guide. Meanwhile, you can find instructions here: https://mhut.ch/addinmaker/1.2
Thank you Michael!
Using the guide i did find that the '' was missing from the project file, other than that i do have the proper dependencies all there.
Build Environment:
** This was included by Right clicking, "Addin References" and selecting, MonoDevelop.AddinMaker
To reproduce the issue i'm having:
1. Build the project as normal (Build > Rebuild All) - No errors
2. Press the Play button
3. I am still receiving errors in the Application Output window.
I've attached the packaged example source if you'd like, it includes "Error.txt" which is the App Output.
Once again, great work and thank you.
The error is:
You should remove "MonoDevelop.AddinMaker" from your "Addin Dependencies" in the solution tree, your addin shouldn't be depending on that addin.
You can also remove
From your
AddinInfo.cs
- the new build targets reference these automatically.Your
Manifest.addin.xml
should have the build actionEmbeddedResource
, notAddinFile
.Dude, YOU'RE AWESOME!! Now that i'm done facepalming at my stupid mistakes, thank you very much for taking the time out of your day.
The Manifest thing I was borrowing it from the MonoDevelop.AddinMaker project, figured it was set like that in there so i did it in mine too.
Have a great weekend!
No worries, this stuff isn't really documented at all and there are lots of easy mistakes with no obvious indicators what's wrong or how to fix them. That's one of the things I'm trying to fix with the Addin Maker