Debugging - Referencing .NET standard 1.4 libraries in Xamarin.Forms Android application (VS 2017)

对着背影说爱祢 提交于 2019-12-22 10:26:25

问题


I use VS 2017.

I have Xamarin.Forms Android project and I have to reference bunch of .NetStandard 1.4 libraries there. I have all projects in one solution.

I basically added references and compiled solution with no problem.

When I call from Xamarin method contained in .Net Standard library, it returns result but no breakpoint is hit inside that method. Also VS 2017 intellisense is not working for methods contained in .NetStandard libraries.

Do I have to do something extra to enable debugging and intellisense in .Net Standard library when it's called from Xamarin.Forms Android application ?

I was confused with this for 2 days now (first I thought my .net standard methods are not called at all) and I dont know what to do.

Could you please give me some suggestions how to make debugging and intellisense working ?

Thank you.


回答1:


I found solution.

You can add to your .netStandard library csproj file

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <DebugType>Full</DebugType>
</PropertyGroup>

This will make debugging work.




回答2:


The solution proposed by TomasK works, alternatively, you can do this through the GUI using the following steps:

  1. Right click on the Project
  2. Click "Properties"
  3. Open the "Build" Tab
  4. Click "Advanced..."
  5. Set "Debugging information" to "full"


来源:https://stackoverflow.com/questions/43350048/debugging-referencing-net-standard-1-4-libraries-in-xamarin-forms-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!