为什么 Finder Sync 扩展在 Debug 配置中工作而不是在 Release 配置中工作?

如何解决为什么 Finder Sync 扩展在 Debug 配置中工作而不是在 Release 配置中工作?

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

添加一个 Finder Sync 扩展,它会在应用运行时在特定文件旁边显示标记。当我在 Visual Studio 的调试配置中运行应用程序时,我对扩展程序的工作方式感到满意,因此我想创建一个包来将应用程序分发给其他 Mac 用户。他们告诉我,他们的 Finder 中没有出现任何徽章。此外,他们没有像我一样在系统偏好设置的扩展面板中的复选框。我尝试从我的开发计算机运行包,但似乎没有加载扩展。我一直试图找出原因,现在我想让它工作。我错过了什么?在此先感谢您的指点。

感谢 Neil 的评论,我已经从 About 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

Here is which checkbox is checked in project option.

编辑:我能想到的调试和发布配置之间的唯一区别是发布的应用程序已签名。我不确切知道签名过程是如何工作的,但我知道它使用安装在 Mac 的 Keychain Access 应用程序中的证书。我在 Mac 的终端中执行了以下行,在从 Visual Studio 构建之后,在创建 DMG 之前。我可以检查 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"

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?