Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

External (managed) C# DLL VS project debug setting "Full" vs "Portable"

Discussion in 'External Tools' started by R1PFake, Jul 7, 2019.

  1. R1PFake


    Aug 7, 2015
    Im usually building "external" C# dlls with Visual Studio which are added to Unity and never had a problem with debugging.
    (Im using Unity 2019 with API set to .NET 4.X and VS 2019)

    Today I created a new Unity project and a new "external" C# project and couldn't manage to debug the external dll, because the breakpoints always claimed that the location can't be found (or something like that). I did the same workflow many times on different projects and I have never seen this before.

    After a some google searches I found the solution: I had to change the debug setting to "Portable" instead of "Full" (default). (To change the setting you have to right click your project in VS, then Build -> Advanced -> Debugging information).

    After changing the setting and rebuilding the breakpoints worked.
    The post mentioned that it must always be set to "Portable" for Unity (with API set to .NET 4.X) to enable debugging. But the weird thing is, I never changed this before, all my other dlls are set to "Full" and I can still debug them and breakpoints will hit just fine.

    So I don't understand why it didn't work this time? I guess I will just set every new project to "Portable" from now on, but I would still like to understand why it worked with the other projects without changing anything?
    Last edited: Jul 7, 2019