Xamarin ios can't find default-568#2x - ios

I can't even compile the default project from visual studio. I created a new project from the new project menu in a fresh directory, changed the app identifier to my apple developer app name, and compile, and it tells me that Default-568#2x.png does not exist.
here is the full error:
System.IO.FileNotFoundException: /Users/boemanation/Library/Caches/Xamarin/mtbs/builds/OpenGL_Xamarin_TestiOS/ddf7db6bef3b320db45c7f9f5fb4bd29/obj/iPhone/Debug/optimized/Default-568h#2x.png does not exist
File name: '/Users/boemanation/Library/Caches/Xamarin/mtbs/builds/OpenGL_Xamarin_TestiOS/ddf7db6bef3b320db45c7f9f5fb4bd29/obj/iPhone/Debug/optimized/Default-568h#2x.png'
at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) <0x34bb690 + 0x002ff> in <filename unknown>:0
at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) <0x34bb578 + 0x000c7> in <filename unknown>:0
at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () <0x34bad88 + 0x00227> in <filename unknown>:0 OpenGL_Xamarin_Test.iOS
I am completely stumped. any ideas?

project > properties > disable "Optimize PNG images files for iOS"
This is a workaround to solve this issue.

Related

Visual Studio for Mac: Guid should contain 32 digits with 4 dashes (xxxx...)

I'm a noob for Visual Studio for Mac. My intention was to check out Xamarin development. My Visual Studio version is 7.3 (Build 799) Community Edition, I've installed on a MB Pro 2015 Mid model.
When I try to create a project in following way,
Multiplatform
App
Games (iOS, Mac)
SpriteKit Game (2D)
And then proceeded with the steps until pressing the create button giving project name and all it just gives me the following Alert and I cannot create the project.
Updated:
I found following Log by going to "Open Log Directory" menu item.
ERROR [2017-12-14 00:46:07Z]: The project could not be created
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument, System.String failureArgumentName, System.Exception innerException) [0x00034] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:200
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:184
at System.Guid.TryParseGuidWithNoStyle (System.String guidString, System.Guid+GuidResult& result) [0x0000e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:611
at System.Guid.TryParseGuid (System.String g, System.Guid+GuidStyles flags, System.Guid+GuidResult& result) [0x000f8] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:451
at System.Guid..ctor (System.String g) [0x00029] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:244
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer+<>c.<SupportsObject>b__1_0 (System.String g) [0x00000] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/AnyAll.cs:38
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer.SupportsObject (MonoDevelop.Projects.WorkspaceObject item) [0x00014] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at MonoDevelop.Projects.WorkspaceObject.InitializeExtensionChain () [0x00091] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:382
at MonoDevelop.Projects.WorkspaceObject.EnsureInitialized () [0x00021] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:74
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.CreateProject (System.String typeGuid, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00046] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:526
at MonoDevelop.Projects.ProjectService.CreateProject (System.String typeAlias, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:341
at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x0012b] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs:140
at MonoDevelop.Ide.Templates.SolutionDescriptor.CreateEntry (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x001e9] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionDescriptor.cs:161
at MonoDevelop.Ide.Templates.ProjectTemplate.CreateWorkspaceItem (MonoDevelop.Projects.ProjectCreateInformation cInfo) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs:311
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.DefaultSolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x0000e] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:67
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.SolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:58
at MonoDevelop.Ide.Templates.TemplatingService+<ProcessTemplate>d__13.MoveNext () [0x00024] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TemplatingService.cs:150
Has anybody out there encountered this kind of an issue? Any solutions or workarounds you already have worked out?
So the problem seems to be that if one of the project types used by the project template is unsupported then an unknown project type is created with an empty flavor guid. This then causes an exception in the Android designer.
In this case the Xamarin.iOS project type was considered to be unsupported since Xamarin.iOS was not installed.
This seems to be a bug in Visual Studio for Mac. Either the project template should not attempt to create a Xamarin.iOS project if it is not supported, or the unknown project should be created with no flavor guids instead of using an empty string.

Xamarin forms ios Crash on start

On my iOS project, my app crash to start in debug , but in release it works.
Xamarin Forms : 1.3
Xamarin Forms Labs 1.2.1 Pre 2
My error :
Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00016] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:543
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x000af] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:329
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:222
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, INode parentNode) [0x00000] in <filename unknown>:0
Attempting to JIT compile method 'Microsoft.Scripting.Interpreter.LightLambda:MakeRun1<InviteVite.Entities.Event, System.DateTime> (Microsoft.Scripting.Interpreter.LightLambda)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at Microsoft.Scripting.Interpreter.LightLambda.MakeDelegate (System.Type delegateType) [0x0000d] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.47/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightLambda.cs:177
at Microsoft.Scripting.Interpreter.LightDelegateCreator.CreateDelegate (System.Runtime.CompilerServices.StrongBox`1[] closure) [0x00000] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.47/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightDelegateCreator.cs:109
at Microsoft.Scripting.Interpreter.CreateDelegateInstruction.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00043] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.47/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/TypeOperations.cs:47
at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x0001b] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.47/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Interpreter.cs:126
Thanks for your help
Have you tried enabling generic value type sharing?
Go to the iOS project's options, iOS Build section. On the Advanced tab check: "Enable generic value type sharing".

stack overflow in F# compiler running under mono

I'm updating the tooling for my project llvm-fs, so I installed the new version of mono and tried to compile it. Using either mono 3.10.0 with fsharpc 3.1 under OS X or mono 3.2.8 with fsharpc 3.0 under ubuntu the compile fails with a stack overflow:
Unhandled Exception:
System.StackOverflowException: The requested operation caused a stack overflow.
at (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr)
at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
at Microsoft.FSharp.Compiler.Driver+DelayedDisposables.System-IDisposable-Dispose () [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.typecheckAndCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter, Microsoft.FSharp.Compiler.ErrorLoggerProvider errorLoggerProvider) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.mainCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.runMain (System.String[] argv) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.main (System.String[] argv) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.StackOverflowException: The requested operation caused a stack overflow.
at (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr)
at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
at Microsoft.FSharp.Compiler.Driver+DelayedDisposables.System-IDisposable-Dispose () [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.typecheckAndCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter, Microsoft.FSharp.Compiler.ErrorLoggerProvider errorLoggerProvider) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.mainCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.runMain (System.String[] argv) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.main (System.String[] argv) [0x00000] in <filename unknown>:0
You can reproduce this error on linux or OS X by doing the following:
git clone git#github.com:fsprojects/llvm-fs.git
cd llvm-fs/
FSC=fsharpc ./build.bash
Under windows fsc 12.0.30815.0 the compile completes with no errors:
fsc --nologo --debug --sig:LLVMFSharp.fsi --target:library --out:LLVMFSharp.dll src/LLVM/FFIUtil.fs src/LLVM/Generated.fs src/LLVM/Core.fs src/LLVM/BitReader.fs src/LLVM/ExecutionEngine.fs src/LLVM/Extra.fs src/LLVM/Target.fs src/LLVM/Quote.fs
Is this a known issue and is there any way to work around it? I've tried passing different options to the mono runtime and none resulted in the compiler exiting normally. I do remember in the past mono has had some problems respecting tailcall instructions but I thought that those problems were mostly resolved. Thanks!
This is too long for a comment, but the error is triggered by this bit of code from generated.fs (in that commenting it out stops the stack overflow - there is an error later once this is commented out) (from line 6496-6506):
[<DllImport(
llvmAssemblyName,
EntryPoint="LLVMRunFunction",
CallingConvention=CallingConvention.Cdecl,
CharSet=CharSet.Ansi)>]
extern void* (* LLVMGenericValueRef *) runFunctionNative(
void* (* LLVMExecutionEngineRef *) EE,
void* (* LLVMValueRef *) F,
uint32 NumArgs,
void* (* LLVMGenericValueRef* *) Args)
// I don't know how to generate an "F# friendly" version of LLVMRunFunction
The crash is occuring in the code that outputs the signature file.
Disabling the signature file fixes the problem (but there is still an underlying bug somewhere).

Can not debug app in ios device with xamarin studio

I have developed an ipad app in xamarin studio(monotouch), suddenly I cannot debug this app in ios device(ipad) any more, but in ios simulator everything works fine.
From the "Build Output" I got following information, any ideas would be nice.
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.IOException: Sharing violation on path /Volumes/BOOTCAMP/IPAD_GIT/Vendor12_IPad/bin/iPhone/Debug/Vendor12_IPad.app/MonoTouch.Dialog.PickerElement.dll.mdb
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in :0
at Mono.Cecil.Mdb.MdbWriter.Dispose () [0x00000] in :0
at Mono.Cecil.ReflectionWriter.TerminateModuleDefinition (Mono.Cecil.ModuleDefinition module) [0x00000] in :0
at Mono.Cecil.StructureWriter.TerminateAssemblyDefinition (Mono.Cecil.AssemblyDefinition asm) [0x00000] in :0
at Mono.Cecil.AssemblyDefinition.Accept (IReflectionStructureVisitor visitor) [0x00000] in :0
at Mono.Cecil.AssemblyFactory.WriteAssembly (Mono.Cecil.AssemblyDefinition asm, System.IO.BinaryWriter bw) [0x00000] in :0
at Mono.Cecil.AssemblyFactory.SaveAssembly (Mono.Cecil.AssemblyDefinition asm, System.IO.Stream stream) [0x00000] in :0
at Mono.Cecil.AssemblyFactory.SaveAssembly (Mono.Cecil.AssemblyDefinition asm, System.String file) [0x00000] in :0
at MTouch.SaveAssembly (Mono.Cecil.AssemblyDefinition assembly, Boolean symbols, System.String destination) [0x00000] in :0
at MTouch.Main2 (System.String[] args) [0x00000] in :0
at MTouch.Main (System.String[] args) [0x00000] in :0
This is probably caused by some oddity in your mounted file system in /Volumes/BOOTCAMP
Try moving your code out of it.
In the "iOS Build"->"Linker Options"->"Linker behavior" I set the value from "Link SDK assemblies only" to "Link all assemblies", and problem solved. But I still didn't understand the difference and don't know if there will be other problems by changing this setting.

How to publish an ASP.NET MVC application to a free host

I'm building an ASP.NET MVC application and I'm trying to deploy it on a free host (0000free) which does support ASP.NET. I tried a couple of things, but none of them worked (i.e. I only see the directory structure when I browse to my web site):
Publishing to a local folder and then copying the published files via ftp over to my host (in the public_html directory).
Publishing via ftp to the root folder: ftp.mywebsite.com
Publishing via ftp to the public_html folder: ftp.mywebsite.com/public_html
Usually I would just drop the html files in the public_html folder, but I'm getting the feeling that the deployment process for an MVC application is slightly different. Do I have to modify the Web.config or some other filer? How does one usually deploy an MVC application (on a free host)?
Update:
I have learned that the host uses Mono and supports .NET 4.0, but I'm still not able to deploy.
I have Visual Studio 2010 and I used its Publish Feature (i.e. right click on the project name and click publish) and I tried several things:
Publish method: FTP to the root folder.
Publish method: FTP to the publich_html folder.
Publish method: File System to the root folder.
Publish method: File System to the publich_html folder.
Publish method: File System to a local directory on my computer and then FTP to root and also tried the public_html folder.
I went into the cPanel (control panel) to try and see if ASP.NET has to be added/enabled for my web site, but I didn't see anything there.
I can't browse to Index.aspx nor can I redirect to it from index.html (as suggested from other posts on the host forum), right now I have a link from index.html to Index.aspx but it's not working either (see http://www.mydevarmy.com)
I've also tried renaming Index.aspx to Default.aspx, but that doesn't work either.
The search utility of the forum of the host is somewhat weak, so I use google to search their forum: http://www.google.com/search?q=publish+asp.net+site%3A0000free.com%2Fforum%2F&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
I've been reading Pro ASP.NET MVC Framework and they have a chapter about publishing, but it doesn't provide any specific information with respect to the location of publishing, this is all they say (and it's not very helpful in my case):
Where Should I Put My Application?
You can deploy your application to any
folder on the server. When IIS first
installs, it automatically creates a
folder for a web site called Default
Web Site at c:\Inetpub\wwwroot\, but
you shouldn’t feel any obligation to
put your application files there. It’s
very common to host applications on a
different physical drive from the
operating system (e.g., in
e:\websites\ example.com). It’s
entirely up to you, and may be
influenced by concerns such as how you
plan to back up the server.
Here is the error I get when I try to view my Index.aspx page:
Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1)
Description: HTTP 500. Error processing request.
Stack Trace:
System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1)
at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSection.DoDeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSection.DeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.get_CompilationConfig () [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
If your hosting provider supports ASP.NET MVC then your deployment process shouldn't be any different than the one for a normal ASP.NET application. If it doesn't you could attempt a bin-deployment. And here's another article on MSDN.
It turns out that the Mono version does not support MVC, so I had to change my host to one that supports ASP.NET MVC. I had to dish out some cash, but "good hosting" isn't free. Anyway, thanks for the help everybody!

Resources