C# 为什么Finder Sync扩展在调试配置中工作,而不是在发布配置中工作?

C# 为什么Finder Sync扩展在调试配置中工作,而不是在发布配置中工作?,c#,packaging,visual-studio-mac,findersync,finder-extension,C#,Packaging,Visual Studio Mac,Findersync,Finder Extension,我正在Visual Studio for Mac下使用.NET Framework 4.5.2开发一个应用程序 我添加了一个Finder Sync扩展,当应用程序运行时,它会在特定文件旁边显示徽章。当我在VisualStudio的调试配置中运行应用程序时,我对扩展的工作方式感到满意,因此我想创建一个包,将应用程序分发给其他Mac用户。他们告诉我他们的发现者身上没有徽章。而且,他们没有像我一样在系统首选项的扩展面板中选中复选框。我试着从我的开发计算机上运行这个包,但似乎没有加载扩展。我一直在想为什

我正在Visual Studio for Mac下使用.NET Framework 4.5.2开发一个应用程序

我添加了一个Finder Sync扩展,当应用程序运行时,它会在特定文件旁边显示徽章。当我在VisualStudio的调试配置中运行应用程序时,我对扩展的工作方式感到满意,因此我想创建一个包,将应用程序分发给其他Mac用户。他们告诉我他们的发现者身上没有徽章。而且,他们没有像我一样在系统首选项的扩展面板中选中复选框。我试着从我的开发计算机上运行这个包,但似乎没有加载扩展。我一直在想为什么,现在我想让它工作起来。我错过了什么?提前感谢您的指点

由于Neil的评论,我已从Visual Studio复制了这些信息,以防版本号有所帮助:

=== Visual Studio Community 2019 for Mac (Preview) ===

Version 8.10 Preview (8.10 build 1720)
Installation UUID: 4c0c4e8f-5757-42c9-828e-5023f03cd4de
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

    Package version: 612000140

=== Mono Framework MDK ===

Runtime:
    Mono 6.12.0.140 (2020-02/51d876a041e) (64-bit)
    Package version: 612000140

=== Roslyn (Language Service) ===

3.10.0-3.21226.12+c153357eb74f4b5c8fc905b7ae42168b76515531

=== NuGet ===

Version: 5.9.0.7134

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.203/Sdks
SDK Versions:
    5.0.203
    5.0.202
    5.0.201
    5.0.103
    5.0.102
    5.0.101
    5.0.100
    3.1.409
    3.1.408
    3.1.407
    3.1.406
    3.1.405
    3.1.404
    3.1.403
    3.1.402
    3.1.401
    3.1.302
    3.1.301
    3.1.202
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    5.0.6
    5.0.5
    5.0.4
    5.0.3
    5.0.2
    5.0.1
    5.0.0
    3.1.15
    3.1.14
    3.1.13
    3.1.12
    3.1.11
    3.1.10
    3.1.9
    3.1.8
    3.1.7
    3.1.6
    3.1.5
    3.1.4
    2.1.23
    2.1.22
    2.1.21
    2.1.20
    2.1.19
    2.1.18

=== .NET Core 3.1 SDK ===

SDK: 3.1.409

=== Xamarin.Profiler ===

Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin Designer ===

Version: 16.10.0.115
Hash: c750fbf1b
Branch: remotes/origin/d16-10
Build date: 2021-05-03 09:46:50 UTC

=== Xamarin.Android ===

Version: 11.3.0.1 (Visual Studio Community)
Commit: xamarin-android/d16-10/22fc2b3
Android SDK: /Users/me/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2

Build Information: 
Mono: b4a3858
Java.Interop: xamarin/java.interop/d16-10@f39db25
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.35.4@85460d3
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-10@c5732a0

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/me/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.11.0.0
Hash: 5ba53c9
Branch: remotes/origin/HEAD
Build date: 2021-04-27 18:41:30 UTC

=== Android Device Manager ===

Version: 16.11.0.1
Hash: 62f2ed1
Branch: remotes/origin/HEAD
Build date: 2021-04-27 18:41:48 UTC

=== Apple Developer Tools ===

Xcode 12.4 (17801)
Build 12E262

=== Xamarin.Mac ===

Version: 7.13.0.7 (Visual Studio Community)
Hash: bb4428722
Branch: d16-10
Build date: 2021-04-29 04:38:53-0400

=== Xamarin.iOS ===

Version: 14.19.0.7 (Visual Studio Community)
Hash: bb4428722
Branch: d16-10
Build date: 2021-04-29 04:38:54-0400

=== Build Information ===

Release ID: 810001720
Git revision: 8e9c72f8275a76ad63a8b753d3d8f96fbcdfe0e0
Build date: 2021-05-06 11:14:39-04
Build branch: release-8.10

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.4.0 Darwin Kernel Version 20.4.0
    Thu Apr 22 21:46:47 PDT 2021
    root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64

编辑:我能想到的调试和发布配置之间的唯一区别是发布的应用程序是经过签名的。我不知道签名过程是如何工作的,但我知道它使用安装在Mac的Keychain Access应用程序中的证书。在从VisualStudio构建之后,在创建DMG之前,我在Mac的终端中执行了下面一行。我可以检查DMG中是否有Contents/PlugIns/FinderExt.appex,因此问题似乎不是.appex没有正确地包含在DMG中,所以我认为可能是由于签名问题,Mac拒绝检测或使用它,但即使使用以下命令,它仍然不起作用

codesign -v --deep --force --sign "Developer ID Application: MyCompany ([...])" "MyApp/bin/Release/$bundlename/Contents/PlugIns/FinderExt.appex"

您使用的VS版本是什么。NET Framework 4.5.2现在已经有8年多的历史了,那时还没有一个版本的VS for Mac。@Neil我已经更新了我的帖子,显示了所有可能相关的版本号。我不确定您是否要求用户使用版本,但用户没有Visual Studio。它只安装在开发计算机上,用于编辑代码和创建DMG包。您不能使用.NET Framework,因为它只在Windows上运行,而且Mac显然不是Windows。@Neil实际上,该应用程序可以工作,只有Finder Sync扩展无法工作。我认为,由于生成的.app文件根目录中名为MonoBundle的文件夹,即使未安装Visual Studio,该应用程序也可以在Mac上运行。此文件夹包含数十个.dylib和.dll文件,我认为Mono使用这些文件在Mac上运行.NET应用程序,就像在Windows下一样。@Neil您需要其他信息还是对我的问题没有任何线索?我最后的评论是否回答了你的问题,还是你认为我对.NET在Mac下的工作方式感到困惑?我已经编辑了这个问题,添加了一个显示项目选项页面的图像。它显示为问题末尾的链接。