简体   繁体   中英

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

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.

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.

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM