Bug 54682 - Unable load debugging symbols for a cross-targeted project that contains more than one TargetFrameworks values
Summary: Unable load debugging symbols for a cross-targeted project that contains more...
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: XI 10.8 (d15-1)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-04-07 00:54 UTC by Jerome Laban
Modified: 2017-07-25 14:14 UTC (History)
4 users (show)

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

repro solution (8.72 KB, application/x-zip-compressed)
2017-04-07 00:54 UTC, Jerome Laban

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 54682 on Developer Community or GitHub 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 or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jerome Laban 2017-04-07 00:54:17 UTC
Created attachment 21287 [details]
repro solution

Using Xamarin.iOS in VS2017, breakpoints in a cross-targeted project that contains more than one TargetFrameworks value do not work, unless the TargetFrameworks property only contains Xamarin.iOS10.

Interestingly, stack frames show the correct debugging information but are not selectable, such as line numbers, and the library is flagged as "[external]" by the debugger in the debug logs.

Also, only the first occurrence of the TargetFrameworks property is taken into account. If the property is set to two frameworks first, then one framework the line after, the symbols are not loaded.

Repro solution is attached.
Comment 2 Jon Goldberger [MSFT] 2017-04-10 21:50:10 UTC
Non-engineering team preliminary quick review
(See https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/ for general reference.)

## Suspected to be a regression or a problem with a new feature?
Unsure. My gut says that this is an unsupported scenario as the "cross targeted" project seems to be a .NET Standard project with the target frameworks changed, i.e. 

> <TargetFramework>netstandard1.4</TargetFramework>

was changed to

> <TargetFrameworks>MonoAndroid60;Xamarin.iOS10</TargetFrameworks>

in the .csproj file for the XTargetTest project (Along with many other elements added to the .csproj file)

NOTE: After loading the test solution, you will have to add the XTargetTest project (in the XPLatAndroidTest folder) to the solution.

## Specific to one particular project, development computer, or target mobile device?
Unsure. See above. 

## Includes clear steps to reproduce the problem?
Not yet. I was not able to reproduce the issue mainly because I could not build the XTargetTest project due to errors about not being able to connect to the Mac build host (though it is connected and the App1 iOS Project builds). Suspect this is due to this being a .NET Standard library with the target frameworks changed, in addition to a build error in the _SayGoodbye task as noted in bug #54654

## Considers the relevant log files for the part(s) of the process where something goes wrong (IDE editing, MSBuild building, deploying, launching, attaching the debugger, an in-app error, or something else), and has them attached?
Not yet.

## Already took up time for many users?
Unclear. I am not aware of any other reports of this issue and also I am not sure if this is a supported scenario yet. I have never seen anyone try to target Xamarin.iOS10 and MonoAndroid60 in the same class library before. Need clarity on how the project was created. 

Setting status as NEEDINFO for clarity on the type of XPLat library project that was created and what changes they made to the .csproj file after creation.
Comment 3 Jerome Laban 2017-04-11 13:15:11 UTC
The changes made to the csproj are the only ones that are present in the cross-targeted project.

The main idea is that properties available in standard Xamarin.iOS and Xamarin.Android csproj templates are conditionally included when each target framework is built, effectively producing a proper binary for each target framework.

This scenario is already supported properly by the VS2017 code editor, as well as the nuget packager.

It's only the debugger that seems to grab the first "TargetFrameworks" xml node, and ignore the rest, as well as ignore multi-targeted projects.