Bug 53474

Summary: VS 2017 Error: ConvertPdbToMdb task failed unexpectedly. PortablePdbNotSupportedException
Product: Visual Studio Extensions Reporter: Daniel Vaughan <dbvaughan>
Component: iOSAssignee: Bugzilla <bugzilla>
Severity: normal CC: christian.daniel, frank.buckley, gabor.nemeth.dev, joe, john.miller, kzu, mono-bugs+bugzilla, mono-bugs+monotouch, timothy.risi
Priority: ---    
Version: unspecified   
Target Milestone: 15.2   
Hardware: PC   
OS: Windows   
Related Links: https://bugzilla.xamarin.com/show_bug.cgi?id=53476
Tags: Is this bug a regression?: ---
Last known good build:

Description Daniel Vaughan 2017-03-17 17:54:20 UTC
I'm referencing a VS 2017 (4.6.01586) .NET Standard 1.4 project from a Xamarin.iOS project. I'm receiving the following error:

Error The "ConvertPdbToMdb" task failed unexpectedly.
Pdb2Mdb.PortablePdbNotSupportedException: Portable PDB '***.pdb' can't be converted to mdb. Consider setting the project 'DebugType' property to 'Full'.
at Pdb2Mdb.Converter.Convert(String filename) in C:\d\lanes\4368\73f58d6d\source\xamarinvs\src\MSBuild\Xamarin.iOS.Tasks\Pdb2mdb\Driver.cs:line 43
at Xamarin.iOS.Tasks.ConvertPdbToMdb.Execute() in C:\d\lanes\4368\73f58d6d\source\xamarinvs\src\MSBuild\Xamarin.iOS.Tasks\Tasks\ConvertPdbToMdb.cs:line 26
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Codon.Ios

The project compiles, but the errors sit there in the Visual Studio Error List.
Comment 1 Timothy Risi 2017-03-19 18:29:58 UTC
*** Bug 53476 has been marked as a duplicate of this bug. ***
Comment 2 Christian Daniel 2017-03-22 15:13:58 UTC
I've the exact same Problem (using VS2017 Pro Final; using Xamarin.Forms 180 || 193)

Steps to reproduce:
 - Create new Xamarin.Forms Project 
 - Create a new .Net Standard library (.Net Standard 1.0 - 1.6)
 - reference library within the iOS Project

=> Compile Fails with: Error The "ConvertPdbToMdb" task failed unexpectedly.
Comment 3 Christian Daniel 2017-03-22 15:45:27 UTC
I made some more Tests and found a Workaround!:

1. Open Project properties of the .Net Standard library.
2. On the "Build" Tab, scroll down and press "Advanced"
3. Set "Debugging Information" to "full"

Solution will compile and run!
Comment 4 Daniel Cazzulino 2017-04-06 18:25:35 UTC
Yes, PPDB support is not there yet. We're targeting VS2017 15.2 for this work, which should be quite soon!
Comment 5 Daniel Cazzulino 2017-04-06 18:32:21 UTC
BTW, the workaround of specifying full for the debug symbols is indeed the supported one.
Comment 6 Daniel Cazzulino 2017-04-18 14:25:25 UTC
This has been merged into the release branch for 15.2 and is on track for shipping soon.