无法使用 formcode 更正部署 infopath 2010 表单
我是 Infopath 开发的新手,请帮忙。 :(
所以我正在使用自定义任务编辑表单开发工作流程。
我在 Infopath Designer 2010 中设计了 infopath 表单 CustomApprovalForm.xsn ,然后将此表单发布到名为 Form(ApproveWF/Form/) 的模块文件夹中的工作流程项目。
然后我配置了正确部署所需的所有属性。部署后一切正常,表单显示应有的样子,
但是当我回到 Infopath Designer 2010 并向 CustomApproval.xsn 添加一些表单代码,然后按快速发布到模块文件夹时。使用上面的方法,然后将工作流程部署到 SP 服务器。
之后,
我在日志中看到了异常:
“解决方案反序列化失败,出现未处理的异常 System.IO.FileNotFoundException:无法加载文件或程序集 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\ApproveWF_Feature1\CustomApprovalForm.dll' 或其依赖项之一。系统找不到该文件 指定......”
我想,我不正确地发布带有代码的 infopath 表单。
如何正确地发布带有代码的 infopath 2010 表单到我的 ApproveWF 项目,然后部署到 SP 服务器?
我应该在哪里放置CustomApproval.dll?
请帮助我!!!
I'm new in Infopath developing, please help. :(
So I'm developing work-flow with custom task edit form.
I designed infopath form CustomApprovalForm.xsn in Infopath Designer 2010 and then I published this form to Workflow project in Module folder which named Form(ApproveWF/Form/).
Then I configured all needed properties for correct deploying. After deploying all works ok and form appears as it should be.
But when I come back to Infopath designer 2010 and add some formcode to CustomApproval.xsn and then I press quick publish to Module folder which I use above and then I deploy the workflow to SP server.
After this the form doesn't appear.
In logs I saw exception:
"Solution deserialization failed with unhandled exception
System.IO.FileNotFoundException: Could not load file or assembly
'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\14\Template\Features\ApproveWF_Feature1\CustomApprovalForm.dll'
or one of its dependencies. The system cannot find the file
specified...."
I suppose, that I'm not correct making publishing infopath form with code behind.
How to correct do publishing infopath 2010 form with code behind to my ApproveWF project which then deploy to SP server?
Where should I place the CustomApproval.dll?
Please help me!!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信,但我必须仔细检查,发生的情况是您首先进行了完整发布,表单后面没有任何代码 - 这注册了清单,其中不包含对 .dll 的引用,因为没有'语气。
然后,您添加了代码,该代码被编译到 dll 中,并在表单的清单中列出。
我认为当您进行快速发布时,表单文件会复制到服务器,但清单不会重新注册。因此,xml/xsl 表单将调用 dll,但清单不知道在哪里可以找到它,因为它没有更新。
tl;dr:当您发布表单然后向其中添加代码时,您必须再次运行完整的发布周期来更新已安装的清单。
如果这不起作用,请发布后续内容。
I believe, but I'll have to double-check, that what happened is that you did a full publish first with no code behind the form - this registered the manifest, which did not include a reference to a .dll, since there wasn't one.
You then added code, which gets compiled into a dll, listed in the manifest for the form.
I think when you do a quick-publish, the form files are copied up to the server, but the manifest isn't re-registered. So the form xml/xsl will have calls to the dll, but the manifest won't know where to find it, since it wasn't updated.
tl;dr: when you publish a form then add code to it, you have to run a full publishing cycle again to update the installed manifest.
Post a follow-up if this doesn't work.
我找到了解决方案。
我必须向工作流项目添加名为空元素的新项目。然后我向其中添加了 xsn CustomForm 的 dll。然后我用 xsn 形式的功能将这个 dll 部署到共享点。
I've found the solution.
I have to add new item to Workflow project which named Empty Element. And then I've added dll of xsn CustomForm to it. And then I've deployed this dll with xsn form like feature to sharepoint.