0

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

我添加了一个 Finder 同步扩展,当应用程序运行时,它会在特定文件旁边显示标记。当我从 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

这是在项目选项中选中的复选框。

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

0 回答 0