Error building Xamarin iOS project - msbuild

After switching to the unified API, while I try to build an iOS application using Xamarin.iOS, I'm getting an error:
error : Error building target _DetectSigningIdentity: Unknown char
Anyone has an idea how to solve it or understands what causes this error?
This is the detailed trace:
error : Error building target _DetectSigningIdentity: Unknown char
Error building target _DetectSigningIdentity: System.FormatException: Unknown char
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in :0
at System.Single.Parse (System.String s, IFormatProvider provider) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionFactorExpression.NumberEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionRelationalExpression.BoolEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionAndExpression.BoolEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionParser.ParseAndEvaluate (System.String condition, Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskBatchingImpl.Execute (IBuildTask buildTask, TaskExecutionMode taskExecutionMode) [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskBatchingImpl.Build (IBuildTask buildTask, TaskExecutionMode taskExecutionMode, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.RunTargetWithBucket (System.Collections.Generic.Dictionary`2 bucket, Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.Run (Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.Build (Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.Target.DoBuild (System.Boolean& executeOnErrors) [0x00000] in :0

Related

Getting "Can't find custom atter constructor image" from a .dll after upgrading to Unity5

I've just upgraded to Unity5 and a small .dll I've made started to give the following error:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Missing method .ctor in assembly [myproj... .dll], type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in Logger
Can't find custom attr constructor image: [myproj... .dll]
mtoken: 0x0a00000e
​
The .dll worked perfectly before updating to Unity 5, and I did recompile the .dll with the unity5 version UnityEngine.dll (needed by my library), but that didn't help. Any ideas how to fix this?

Getting exceptions like object used after being disposed, NullReference while upload to Amazon.S3

I have a code which reads file in stream and uploads it to amazon S3. I used Amazon .net SDK for Monotouch and Mono for Android which internally where Amazon SDK AssemblyVersion("1.5.2.1")
which is working fine.
But sometimes following exceptions are thrown while upload:
Message = The object was used after being disposed.;
StackTrace = at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
Message = Object reference not set to an instance of an object;
StackTrace = at System.ServiceModel.Dispatcher.BaseMessagesFormatter.DeserializeReply (System.ServiceModel.Channels.Message message, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
I've NOT set file stream = null or dispose for file stream being uploaded any where in code.
Found similar problem explained here
the line where I get exception, it tries to upload the given stream to s3.
More detailed explanation http://forums.xamarin.com/discussion/27098/getting-exceptions-like-object-used-after-being-disposed-nullreference-while-upload-to-amazon-s3
Some more stack traces:
--
UploadUsingHighLevelAPI; Message = Object reference not set to an instance of an object;
StackTrace = at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.transform (System.String responseBody, System.String actionName, System.Type t) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.processRequestError (System.String actionName, System.Net.HttpWebRequest request, System.Net.WebException we, System.Net.HttpWebResponse errorResponse, System.String requestAddr, System.Net.WebHeaderCollection& respHdrs, System.Type t, System.Exception& cause) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.handleHttpWebErrorResponse (Amazon.S3.Model.S3Request userRequest, System.Net.WebException we, System.Net.HttpWebRequest request, System.Net.HttpWebResponse httpResponse, System.Exception& cause, System.Net.HttpStatusCode& statusCode) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getResponseCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0
--
UploadUsingHighLevelAPI; Message = Error: SendFailure (Error writing headers);
StackTrace = at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getRequestStreamCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0

Get MonoGame working on Raspberry Pi

this is my first post here in the pi forums. My pi arrived yesterday, and i am really exited to get my Application running on the pi.
i want to do the following ... i want to make a simple Playlist with the current songs in the playlist. just the covers of the first 4 songs should be shown. I have this already done in VB.Net using XNA. I tried to port it to monogame, with an GraphicsModeException of OpenTK when running on the PI.
Even a small "Hello World" string rendering is failing with the same exception. All is done via simple spritebatch rendering
Any suggestions ?
Edit : Source and Error
Source : https://bitbucket.org/S3NS4Ti0N/coverflow-test
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.PlatformNotSupport edException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.Plat formNotSupportedException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Mono only supports softfloat mode, while most RPi OSes default to hardfloat. hardfloat support is scheduled for the next mono release I believe. If you build the mono source from the git repo, you can get this now.

Is it MonoDevelop's bug?

I use Debian Squeeze and MonoDevelop 2.4 for my program and I have some problems with it. When I trying to save my project's changes, I have next message dialog of MonoDevelop:
System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.IsValidClass (MonoDevelop.Projects.Dom.Parser.ProjectDom ctx, IType cls, Stetic.Component obj) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.GetClass (Boolean getUserClass) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.GetClass () [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.UpdateBindings (System.String fileName) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderView.Save (System.String fileName) [0x00000] in :0
at MonoDevelop.Ide.Gui.Document.Save () [0x00000] in :0
at MonoDevelop.Ide.Gui.Workbench.SaveAll () [0x00000] in :0
at MonoDevelop.Ide.Commands.SaveAllHandler.Run () [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.Run (System.Object dataItem) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x00000] in :0
When I trying to add some event for my project's form, I have the same. What does it mean and how can I fix this problem?
You should try to use latest Mono and latest MonoDevelop,
http://pkg-mono.alioth.debian.org/ (3.0.6)
http://monodevelop.com/Download (4.0.8)
MonoDevelop 2.4.* was two years ago,
http://monodevelop.com/Download/MonoDevelop_2.4.2_Released?highlight=2.4+release+notes

Embedded mono + app.config

I have embedded mono in a c++ program and loaded a dll which requires an app.config. I am getting this kind of error, does someone have an idea on how to ship *.config with an embedded mono ?
The stack trace :
System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ArgumentException: The 'ExeConfigFilename' argument cannot be null.
at System.Configuration.ExeConfigurationHost.CheckFileMap (ConfigurationUserLevel level, System.Configuration.ExeConfigurationFileMap map) [0x00000] in <filename unknown>:0
at System.Configuration.ExeConfigurationHost.InitForConfiguration (System.String& locationSubPath, System.String& configPath, System.String& locationConfigPath, IInternalConfigRoot root, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.C[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0 onfiguration.InternalConfigurationSystem.InitForConfiguration (System.String& locationConfigPath, System.String& parentConfigPath, System.String& parentLocationConfigPath) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object
Self answer : you can't (as of 2013-04-30). To enable this behaviour, I had to change mono's framework sources mono/mcs/class/corlib/system/appdomain.cs :
public AppDomainSetup SetupInformation {
get {
return SetupInformationNoCopy; // newline
// AppDomainSetup setup = getSetup (); //old
// return new AppDomainSetup (setup); //old
}
}