0

I have developed a Xamarin Forms app that is composed of a shared base project (using netstandard 2.0), that contains most of the code, and Android & iOS project that contains specific features for each platform.

I don't know how or when it happened (as most of the development is done in the base project), but suddenly I can't debug any code that is within the Android or iOS projects (I can debug the code in the shared project just fine), and I get a "Source Not Available" message when I try to step into any code that runs on them (breakpoints don't work either).

Obviously everything is compiled in debug mode, and I've checked that "Debug Information: Full" is set for both of them. As an example, this is the Android Build Configuration of the Android project:

Android Build Configuration

Any hints on what could cause this behavior would be appreciated.

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
salgiza
  • 5,832
  • 2
  • 26
  • 32
  • 1
    You can firstly delete the folder `bin` and `obj` in share project and specific platforms . Then clean and rebuild it. And make sure the version of VS for Mac is up to date . – Lucas Zhang Dec 05 '19 at 13:33
  • @LucasZhang-MSFT I just deleted the bin and obj folders for all projects, and no luck. The version of VS is 8.3.10 (build 2) and there are no further updates available. – salgiza Dec 05 '19 at 14:03
  • 1
    Just remove the reference of your shared project to platform specific and add back. That might help. – N Subedi Dec 05 '19 at 19:24
  • 1
    I was having issues with this on the most recent version of xcode + visual studio for mac. I had to switch to the preview channel for debugging to work again – stepheaw Dec 05 '19 at 22:23
  • 1
    @salgiza Have you tried remove cache of Visual Studio for Mac? https://stackoverflow.com/questions/46246437/visual-studio-for-mac-cache-location – Jan Nepraš Dec 06 '19 at 09:27
  • @NirmalSubedi It is the other way around. It's the platform specific projects that reference the shared project. Or, to put it in a different perspective: I'm actually running/debugging the Android project, but I can't debug its code, only the code of the shared project that it references! – salgiza Dec 10 '19 at 08:28
  • @JanNepraš I just deleted all cache folders, but no luck :( – salgiza Dec 10 '19 at 08:45
  • @salgiza Then let's try Visual Studio for Mac preview. https://learn.microsoft.com/en-us/visualstudio/mac/update?view=vsmac-2019 – Jan Nepraš Dec 10 '19 at 10:45

0 Answers0