Unable to build project after moving to external hard drive

JasonLaskaJasonLaska USMember
edited December 2016 in Xamarin.iOS

I can't build my iOS project anymore after moving the solution to an external hard drive. Unfortunately I have no choice as I'm quickly running out of space on my primary drive. Which of course causes all sorts of mayhem. The error I am receiving is:

[SOLUTION PATH]/MTOUCH: Error MT2001: Could not link assemblies. Reason: Sharing violation on path [SOLUTION PATH]/obj/iPhone/Debug/build-iphone7.1-10.1.1/mtouch-cache/PreBuild/Xamarin.iOS.dll.mdb (MT2001)

Thanks in advance. Any help getting past this would be appreciated.

Posts

  • BytesGuyBytesGuy GBXamarin Team Xamurai

    Have you tried cleaning the solution before re-building? Build -> Clean All

  • JasonLaskaJasonLaska USMember

    I actually have tried that, yes. In fact I've even gone so far as to completely delete the bin and obj folders and then rebuild. Still getting the same result. It's confusing because if I copy the same solution back to my primary drive on my MacBook it builds without any issues at all.

  • JaskaAhlforsJaskaAhlfors USMember

    Hi!

    Any progress on this?

    I am experiencing the same issue with Xamarin.Android. Building from my MacBook's HardDrive it builds (at least with other errors) but building from Seagate Backup Plus Hard drive results ALWAYS following:

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA0009: Error while loading assembly: bin/Debug/XamarinTestAndroid.dll ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
    at Mono.Cecil.PE.ImageReader.ReadImage () [0x0002d] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00009] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00029] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000c] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00001] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly (System.String file) [0x0009c] in :0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00035] in :0
    --- End of inner exception stack trace ---
    at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, System.Exception innerException, System.String message, System.Object[] args) [0x0000a] in <614c479014764f1e944617b27577f29f>:0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00045] in :0
    at Xamarin.Android.Tasks.ResolveAssemblies.Execute () [0x00154] in :0 (XamarinTestAndroid)

    The solution above was created new to backup. When moved to hard drive it built fine.

  • JaskaAhlforsJaskaAhlfors USMember

    Hi!

    Any progress on this?

    I am experiencing the same issue with Xamarin.Android. Building from my MacBook's HardDrive it builds (at least with other errors) but building from Seagate Backup Plus Hard drive results ALWAYS following:

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA0009: Error while loading assembly: bin/Debug/XamarinTestAndroid.dll ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
    at Mono.Cecil.PE.ImageReader.ReadImage () [0x0002d] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00009] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00029] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000c] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00001] in <72833adbe6cb4f168094a4e7cb721335>:0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly (System.String file) [0x0009c] in :0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00035] in :0
    --- End of inner exception stack trace ---
    at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, System.Exception innerException, System.String message, System.Object[] args) [0x0000a] in <614c479014764f1e944617b27577f29f>:0
    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00045] in :0
    at Xamarin.Android.Tasks.ResolveAssemblies.Execute () [0x00154] in :0 (XamarinTestAndroid)

    The solution above was created new to backup. When moved to hard drive it built fine.

Sign In or Register to comment.