Bug 38290 - Xamarin.iOS contains additional assembl(ies) on Windows
Summary: Xamarin.iOS contains additional assembl(ies) on Windows
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Installer ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Low enhancement
Target Milestone: Future Cycle
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-02 05:39 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-12-27 23:35 UTC (History)
5 users (show)

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


Attachments
Detailed version info (1.15 KB, text/plain)
2016-02-02 05:39 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 for Bug 38290 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Brendan Zagaeski (Xamarin Team, assistant) 2016-02-02 05:39:51 UTC
Created attachment 14842 [details]
Detailed version info

Unhelpful "...MonoTouch\v1.0\Newtonsoft.Json.dll' in framework 'MonoTouch,Version=v1.0': System.BadImageFormatException" error in IDE log file




## Steps to replicate

Launch Xamarin Studio on Windows.




## Results

The `Ide*.log` file now contains the following unsolvable error message:

> Error reading name for assembly 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Newtonsoft.Json.dll' in framework 'MonoTouch,Version=v1.0':
> System.BadImageFormatException: Could not load file or assembly 'Newtonsoft.Json.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
> File name: 'Newtonsoft.Json.dll' ---> System.BadImageFormatException: Could not load file or assembly 'Newtonsoft.Json.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
> File name: 'Newtonsoft.Json.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)




## Expected Results

Since Xamarin Studio on Windows does not provide support for Xamarin.iOS, it is surprising that a `MonoTouch` path appears during the app initialization process. I suspect that might not be intentional and could be fixed.




## Version info (brief)

Tested with "Cycle 6 – Service Release 1".

Regression status: not yet tested, but I suspect it migt not be a recent regression.
Comment 2 Lluis Sanchez 2016-02-02 08:55:04 UTC
The assemblies are there because VS and MSBuild needs them. Xamarin Studio scans all registered frameworks. Maybe we could lazy load that information, but it is not a priority right now.
Comment 3 byoungbnice 2016-02-19 04:51:10 UTC
So what is the fix?  I also have this issue.  Just started a trial Xamarin Studio and tried a sample Forms Gallery app.

ERROR [2016-02-18 21:29:29Z]: Error reading name for assembly 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0\Newtonsoft.Json.dll' in framework 'MonoTouch,Version=v1.0':
System.BadImageFormatException: Could not load file or assembly 'Newtonsoft.Json.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Newtonsoft.Json.dll' ---> System.BadImageFormatException: Could not load file or assembly 'Newtonsoft.Json.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Newtonsoft.Json.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 4 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-19 05:05:13 UTC
@byoungbnice, this particular error in the log files is ignorable. It wouldn't have an effect on running the Forms Gallery app. Depending on the particular problems you are seeing with the Forms Gallery app, there are various further troubleshooting steps to try. See http://xamarin.com/support for information about possible avenues for further investigation.
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-24 04:55:15 UTC
I will mark Comment 5 and Comment 6 as private since they are unrelated to the issue described in Comment 0. That will help keep this bug report focused on the symptoms from Comment 0. For further assistance with the issue from Comment 5 and Comment 6, please use either "Business & Enterprise Support" or "Community Support" as described on http://xamarin.com/support. (Contrary to what the that (probably slightly outdated) build error message says, I would recommend one of those 2 "Support" options over filing bug report in this case.) Thanks!
Comment 8 Mikayla Hutchinson [MSFT] 2016-03-29 21:01:20 UTC
Newtonsoft.Json.dll isn't part of the framework, it shouldn't be in that directory anyway.
Comment 9 Mikayla Hutchinson [MSFT] 2016-03-29 21:04:03 UTC
Moved to VS installer since that's the cause of the actual error.