autodesk-forge - Autodesk Forge:由于 AppPackage 问题,WorkItem 失败
问题描述
我的 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'
},
解决方案
确保仔细检查您如何压缩您上传的 AppPackage。如果您查看 zip 文件,请确保您有一个名为 PACKAGE_NAME.bundle 的文件夹,并且 PackageContents.XML 文件位于该 PACKAGE_NAME.bundle 文件夹中。
推荐阅读
- python - 根据视图中的计算字段对 django ListView 进行排序
- android - 如何使用复选框删除recyclerview项目?
- javascript - 在 SQL 中根据销售百分比创建客户集群
- python - Kivy App:TypeError:object.__init__() 只接受一个参数(要初始化的实例)
- php - 无法更改 WordPress 预览帖子链接(带有 preview_post_link)
- python - 从一列和一行创建矩阵
- matlab - MATLAB FFT 练习题
- swift - CollectionView 标头 ReusableView
- git - 当数据几乎从不改变时,Git Repo 中的 BLOB 数据会那么糟糕吗?
- php - 我无法弄清楚为什么我的 UserModel 在 CodeIgniter 4 中出现错误