Bug 28466 - VS incorrectly includes iOS build assemblies in MonoTouch framework folder
Summary: VS incorrectly includes iOS build assemblies in MonoTouch framework folder
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-26 12:36 UTC by Mikayla Hutchinson [MSFT]
Modified: 2016-07-05 07:16 UTC (History)
5 users (show)

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

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:
VERIFIED FIXED

Description Mikayla Hutchinson [MSFT] 2015-03-26 12:36:22 UTC
VS incorrectly includes iOS *build* assemblies in the MonoTouch *framework* folder. This is incorrect.

They also appear to be encrypted, as XS can't read them. This causes errors in the XS log file that make users think something is wrong with XS:

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)
Comment 2 Mikayla Hutchinson [MSFT] 2015-03-26 15:00:18 UTC
I'm still seeing it with whatever's in the alpha channel.

Is it possible that newer installers no longer install those assemblies, but do not remove them if they are already present?
Comment 3 Danish Akhtar 2016-07-05 07:16:53 UTC
I have checked this with latest master XVS 99.0.0.2789 and observed that now this issue is not exits, I am not getting 'Xamarin.iOS.Tasks.Core.dll' on windows at this location: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Xamarin.iOS.Tasks.Core.dll'

Hence marking this as Verified.

I am also able to reproduce it with old XVS 3.9.525-1. With this XVS I am getting 'Xamarin.iOS.Tasks.Core.dll' t this location: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Xamarin.iOS.Tasks.Core.dll', while building application also getting ann error message: "Could not load file or assembly 'Xamarin.iOS.Tasks.Core.dll'

Also checked if assemblies present on system then it removes, once we install latest master XVS 99.0.0.2789.