Repository: godot
Issue: Crashes on exported builds for macOS, when using C# (NuGet) packages
Labels: bug,topic:dotnet,topic:export

### Godot version

3.4.4.stable.mono

### System information

macOS 12.4, MacBook Pro M1, GLES3

### Issue description

When I use C# packages via the NuGet package manager, then export the game, I get crashes.
I had some discussions about this with people in the Godot Discord/C# channel, and it was pointed out to me that currently, Godot does not properly bundle external C# dependencies when building - especially when those are native libraries.

Some NuGet packages, such as the popular *QuestPDF* library, require native dependencies themselves. This can at least be worked around, when testing in the editor, by copy-pasting the native .dylib file from the hidden NuGet folder into the Godot Project folder root and including `<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>` in the .csproj file.

It all breaks down, however, when exporting the project and trying to run it - it just crashes.

On another note, AOT compilation on macOS/Godot Mono is also currently broken, when exporting I get:
`Could not find a part of the path '/Users/MyUserName/New Game Project/osx-x86_64'.`
Maybe I should open a separate issue for that?

### Steps to reproduce

**Method A**

1. Download Godot Mono 3.4.4 on the latest version of macOS 12.4
2. Create a new, empty project
3. Import the NuGet package `Newtonsoft.Json` (the most popular and common NuGet package)
4. Paste this sample code into any node script:
```cs
string json = @"{
   'CPU': 'Intel',
   'PSU': '500W',
   'Drives': [
     'DVD read/writer'
     /*(broken)*/,
     '500 gigabyte hard drive',
     '200 gigabyte hard drive'
   ]
}";

JsonTextReader reader = new JsonTextReader(new StringReader(json));
while (reader.Read())
{
    if (reader.Value != null)
    {
        Console.WriteLine("Token: {0}, Value: {1}", reader.TokenType, reader.Value);
    }
    else
    {
        Console.WriteLine("Token: {0}", reader.TokenType);
    }
}
```
5. Build the project
6. Export the project with default settings and try to run it.

**Method B:**
1. Download Godot Mono 3.4.4 on the latest version of macOS 12.4
2. Create a new, empty project
3. Import the NuGet package `QuestPDF`
4. Import the NuGet package `SkiaSharp.NativeAssets.macOS` ([this is required as per the QuestPDF documentation](https://www.questpdf.com/documentation/patterns-and-practices.html#support-for-custom-environments-cloud-linux))
5. Paste this sample code into any node script:
```cs
Document.Create(container =>
    {
        container.Page(page =>
        {
            page.Size(PageSizes.A4);
            page.Margin(2, Unit.Centimetre);
            page.PageColor(Colors.White);
            page.DefaultTextStyle(x => x.FontSize(20));

            page.Header()
                .Text("Hello, World!")
                .SemiBold().FontSize(36).FontColor(Colors.Yellow.Medium);

            page.Content()
                .PaddingVertical(1, Unit.Centimetre)
                .Column(x =>
                {
                    x.Spacing(20);
        
                    x.Item().Text(Placeholders.LoremIpsum());
                    x.Item().Image(Placeholders.Image(200, 100));
                });

            page.Footer()
                .AlignCenter()
                .Text(x =>
                {
                    x.Span("Page ");
                    x.CurrentPageNumber();
                });
        });
    })
    .GeneratePdf("hello.pdf");
```
6. Try to run the project from within the editor: This crashes Godot.
7. Paste the file `libSkiaSharp.dylib` from the folder `~/.nuget/packages/skiasharp.nativeassets.macos/2.88.1-preview.1/runtimes/osx/native/` into your Godot project folder.
8. Now, the project should run from within the editor.
9. Export the project.
10. The project should crash when executed.

### Minimal reproduction project

_No response_