Bug 51775 - System.IO.DirectoryNotFoundException: Directory '/Library/Frameworks/Xamarin.iOS.framework/Versions/usr/lib/mono/2.1' not found.
Summary: System.IO.DirectoryNotFoundException: Directory '/Library/Frameworks/Xamarin....
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-01-26 05:51 UTC by Majid Rafigh
Modified: 2017-01-28 05:37 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Xamarin logs from windows 10 machine (11.87 KB, application/zip)
2017-01-28 01:38 UTC, Majid Rafigh
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Majid Rafigh 2017-01-26 05:51:35 UTC
I'm trying to run my iOS application on my Mac but I get below error:
here is my environment :
iMac: macOS Sierra 10.12.1
Windows 10 running on vmware fusion 
Visual Studio 2015



C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(696,3): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
2>  System.IO.DirectoryNotFoundException: Directory '/Library/Frameworks/Xamarin.iOS.framework/Versions/usr/lib/mono/2.1' not found.
2>    at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0 
2>    at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0 
2>    at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0 
2>    at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
2>    at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Emanuel 2017-01-26 13:21:50 UTC
Hi Majid,
In order to properly investigate this issue we'll need more info from your end, could you attach the following data?

1) Your Xamarin for Visual Studio version, you can find it in 'Help -> About Microsoft Visual Studio' and there you can use the 'Copy Info' button to grab all the information from VS.
2) The Detailed Build output instead of just the exception, that would give us context of what's going on when you get this exception. To get Detailed info in your Build Output you should go to 'Build -> Options -> Project and Solutions -> Build and Run' and change the 'MSBuild project build output verbosity' to Detailed.
3) The Xamarin.iOS framework installed on the Mac. You can get this info from Xamarin Studio on the Mac, in 'Xamarin Studio -> About Xamarin Studio -> Show Details' and there you can use the Copy Information button to grab all the information of your Mac environment.
4) If you create a new iPhone Single View App from Visual Studio, are you able to build and run it in a simulator?

Thanks for reporting!
Comment 2 Majid Rafigh 2017-01-28 01:36:32 UTC
Hi Emanuel,

Thank you for the response. I deleted my VM and installed a fresh windows 10 and VS 2015 with all Xamarin components. I tried to create very simple cross platform application and I still get the same error. I am able to run the iOS simulator but not build my code. I am attaching the Xamarin logs as well.

Here is the other details details you needed:


1)
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90053-51026-AA905
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-90053-51026-AA905
Microsoft Visual Basic 2015

Visual C# 2015   00322-90053-51026-AA905
Microsoft Visual C# 2015

Visual C++ 2015   00322-90053-51026-AA905
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-90053-51026-AA905
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.17.00119.9
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Clang with Microsoft CodeGen   14.0.25516
Clang with Microsoft CodeGen

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   2.2.0.5
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Xamarin   4.2.2.11 (00fa5cc)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.2.42 (501e63c)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.3.1.8 (7beaef4)
Visual Studio extension to enable development for Xamarin.iOS.
===============================================================



2)
1>------ Build started: Project: TestNativeApp, Configuration: Debug Any CPU ------
1>  TestNativeApp -> c:\Users\majid\Documents\Visual Studio 2015\Projects\TestNativeApp\TestNativeApp\TestNativeApp\bin\Debug\TestNativeApp.dll
2>------ Build started: Project: TestNativeApp.iOS, Configuration: Debug iPhoneSimulator ------
2>  Generated session id: b301aaeda401188cd2f4f58ac595b7bd
2>  Generated build app name: TestNativeApp.iOS
2>  Connecting to Mac server Majids-iMac.local...
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1025,3): warning : A 83.5x83.5@2x app icon is required for iPad apps targeting iOS 9.0 and later
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1025,3): warning : An iPhone Retina (4-inch) launch image for iOS 7.0 and later is required.
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1025,3): warning : LaunchImage.launchimage/Default-Portrait.png is 768x1004 but should be 768x1024.
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1025,3): warning : LaunchImage.launchimage/Default-Portrait@2x.png is 1536x2008 but should be 1536x2048.
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1025,3): warning : The app icon set "AppIcons" has an unassigned child.
2>  TestNativeApp.iOS -> c:\Users\majid\Documents\Visual Studio 2015\Projects\TestNativeApp\TestNativeApp\TestNativeApp.iOS\bin\iPhoneSimulator\Debug\TestNativeApp.iOS.exe
2>  Detected signing identity:
2>    Bundle Id: com.your-company.TestNativeApp.iOS
2>    App Id: com.your-company.TestNativeApp.iOS
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(696,3): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
2>  System.IO.DirectoryNotFoundException: Directory '/Library/Frameworks/Xamarin.iOS.framework/Versions/usr/lib/mono/2.1' not found.
2>    at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0 
2>    at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0 
2>    at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0 
2>    at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
2>    at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

==============================================================================





3)
Xamarin Studio Community
Version 6.1.4 (build 1)
Installation UUID: 7d079e25-5840-48e0-af40-2f4f8670c1d7
Runtime:
	Mono 4.6.2 (mono-4.6.0-branch/ac9e222) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406020016

NuGet
Version: 3.4.3.0

Xamarin.Profiler
Not Installed

Apple Developer Tools
Xcode 8.2.1 (11766.1)
Build 8C1002

Xamarin.Mac
Version: 2.10.0.120 (Xamarin Studio Community)

Xamarin.iOS
Version: 10.3.1.8 (Xamarin Studio Community)
Hash: 7beaef4
Branch: cycle8-xi
Build date: 2016-12-20 02:58:14-0500

Xamarin.Android
Version: 7.0.2.42 (Xamarin Studio Community)
Android SDK: /Users/majidrafigh/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Not Installed

Xamarin Inspector
Version: 1.0.0.0
Hash: 1f3067d
Branch: master
Build date: 2016-11-15 2:13:59 PM

Build Information
Release ID: 601040001
Git revision: e606823f2dd01b4552216c013b597a73bec2068f
Build date: 2017-01-10 17:28:57-05
Xamarin addins: c92d0626d347aaa02839689eaac2961d24c9f446
Build lane: monodevelop-lion-cycle8

Operating System
Mac OS X 10.12.1
Darwin Majids-iMac.local 16.1.0 Darwin Kernel Version 16.1.0
    Thu Oct 13 21:26:57 PDT 2016
    root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64

Enabled user installed addins
Xamarin Inspector 1.0.0.0
=============================================================================



4) I can run the simulator itself but I'm not able to build and run my code. I will attach screenshots as well.
Comment 3 Majid Rafigh 2017-01-28 01:38:23 UTC
Created attachment 19547 [details]
Xamarin logs from windows 10 machine
Comment 4 Majid Rafigh 2017-01-28 05:37:05 UTC
Hi Emanuel,

I cleaned everything from my iMac based on this topic:

https://forums.xamarin.com/discussion/13755/complete-uninstall-on-mac-help

After cleanup, I installed Xamarin on iMac and was able to build the code successfully.

Thanks to Jeffrey Stedfast.