1

我的 AppPackage 无法加载,我无法在文档或错误消息/代码中找到确切的答案。

我通过将它解压缩到本地计算机上的“C:\Program Files\Autodesk\ApplicationPlugins”来测试该包,它按预期运行/加载。

AppPackage 表示创建成功,我确定是最新版本。

该插件是一个 .NET DLL 文件。

错误报告消息

[02/15/2019 18:44:48] Starting work item ffbcfc1ca50546fc9a6372424b2cdae1
[02/15/2019 18:44:48] Start download phase.
[02/15/2019 18:44:48] Start downloading file <CENSORED>.
[02/15/2019 18:44:48] Start preparing AppPackage <CENSORED>.
[02/15/2019 18:44:48] Download bits and install app to local cache.
[02/15/2019 18:44:48] End downloading file <CENSORED>.
[02/15/2019 18:44:48] End download phase.
[02/15/2019 18:44:48] Error: Failed to prepare app package(s).
[02/15/2019 18:44:48] Error: An unexpected error happened during phase Downloading of job.
[02/15/2019 18:44:48] Job finished with result FailedEnvironmentSetup

包内容.XML

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="AutoCAD"
                    AppVersion="0.1.0"
                    ProductType="Application"
                    Name="CENSORED"
                    Description="CENSORED"
                    Author="CENSORED"
                    FriendlyVersion="0.1.0"
                    ProductCode="{CENSORED}"
                    UpgradeCode="{CENSORED}"
                    Helpfile="./help.html"
                    Icon="./my-icon.jpeg">

    <CompanyDetails Name="CENSORED" Phone="CENSORED" Email="CENSORED"/>

    <Components>
        <RuntimeRequirements SeriesMin="R22.0" Platform="AutoCAD*" OS="Win64"/>

        <ComponentEntry AppName="CENSORED" Version="0.1.0" ModuleName="./CENSORED.dll" AppType=".Net"
                        AppDescription="CENSORED" LoadOnAutoCADStartup="True">
        </ComponentEntry>
    </Components>

</ApplicationPackage>

活动定义:注意我必须在这里手动扩展一些内联函数,因为我把它分成了多个部分。如果我有错字,请放心,代码实际上是按语法运行的。

let activity = <CreateActivityRequest>{
            Id: id,
            Version: 1,
            IsPublic: false,
            AppPackages: ['PACKAGE_NAME'],
            Instruction: {Script: 'D6 '},
            RequiredEngineVersion: '22.0',
            Parameters: {
                InputParameters: [{Name: 'HostDwg', LocalFileName: '$(HostDwg)'}],
                OutputParameters: [{Name: 'output', LocalFileName: `output.json`}]
            },
            HostApplication: undefined,
            AllowedChildProcesses: []
        };

来自 AppPackages 列表的条目:

{
  References: [],
  Resource: '...',
  RequiredEngineVersion: '22.0',
  IsPublic: false,
  IsObjectEnabler: false,
  Version: 1,
  Timestamp: '2019-02-15T19:32:33.527Z',
  Description: '',
  Id: 'CENSORED'
},
4

1 回答 1

2

确保仔细检查您如何压缩您上传的 AppPackage。如果您查看 zip 文件,请确保您有一个名为 PACKAGE_NAME.bundle 的文件夹,并且 PackageContents.XML 文件位于该 PACKAGE_NAME.bundle 文件夹中。

于 2019-02-15T20:35:10.493 回答