xamarin-macios/dotnet
Rolf Bjarne Kvinge f0f47b6a46
[dotnet] Make the linker always process debug symbols, and remove debugging support if we're building a release build. (#9594)
Unfortunately due to when things happen in the .NET build logic, we need to
define the DebuggerSupport property (which determines whether the app should
include debugging support or not) before importing the .NET build files. Since
we want to use the _BundlerDebug property (a.k.a. MtouchDebug/MmpDebug) to
determine if the app should include debugging support, we must figure out the
value of the _BundlerDebug property before we can define the DebuggerSupport
property. This turned out complicated, because we're currently defining
_BundlerDebug in our old-style MSBuild logic, which is imported after we
import the .NET build logic.

The end result is that we can either shuffle around a lot of MSBuild code, or
copy a few lines to set the _BundlerDebug property. Neither option makes me
very happy, but copying a few lines of code seemed the better option, so
that's what I did.

Fixes these linkall test failures in Release mode:

    LinkAll.Attributes.AttributeTest
        [FAIL] DebugAssemblyAttributes :   DebuggableAttribute
            Expected: False
            But was:  True
                at LinkAll.Attributes.AttributeTest.DebugAssemblyAttributes()

        [FAIL] DebugConstructorAttributes :   No debug attribute in release mode
            Expected: 0
            But was:  2
                at LinkAll.Attributes.AttributeTest.DebugConstructorAttributes()

        [FAIL] DebugPropertyAttributes :   DebuggerBrowsable
            Expected: False
            But was:  True
                at LinkAll.Attributes.AttributeTest.DebugPropertyAttributes()

        [FAIL] DebugTypeAttributes :   no debug attribute in release mode
            Expected: 0
            But was:  5
                at LinkAll.Attributes.AttributeTest.DebugTypeAttributes()

        [FAIL] DebuggerTypeProxy_24203 :   proxy
            Expected: null
            But was:  <System.Collections.Generic.IDictionaryDebugView`2[K,V]>
                at LinkAll.Attributes.AttributeTest.DebuggerTypeProxy_24203()
2020-09-08 14:55:34 +02:00
..
Microsoft.iOS.Sdk Create and publish .NET NuGet packages. (#8576) 2020-05-13 15:23:29 +02:00
Microsoft.macOS.Sdk [dotnet] Implement 'dotnet run' for macOS apps. (#8600) 2020-05-14 17:16:35 +02:00
Microsoft.tvOS.Sdk Create and publish .NET NuGet packages. (#8576) 2020-05-13 15:23:29 +02:00
Microsoft.watchOS.Sdk Create and publish .NET NuGet packages. (#8576) 2020-05-13 15:23:29 +02:00
package [dotnet] Ship libxamarin.dylib and friends. (#8830) 2020-06-15 17:47:18 +02:00
targets [dotnet] Make the linker always process debug symbols, and remove debugging support if we're building a release build. (#9594) 2020-09-08 14:55:34 +02:00
.gitignore [dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532) 2020-08-31 09:27:19 +02:00
DefaultCompilationIncludes.md [dotnet] Disable default compilation includes for binding projects. 2020-08-10 16:12:41 +02:00
Makefile [dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532) 2020-08-31 09:27:19 +02:00
VERSIONS.md Rename master to main. (#8851) 2020-06-16 15:51:44 +02:00
generate-target-platforms.csharp [dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532) 2020-08-31 09:27:19 +02:00