使用mkbundle在Mono上构建CSOM c#应用 [英] Building a CSOM c# app on Mono using mkbundle

查看:94
本文介绍了使用mkbundle在Mono上构建CSOM c#应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Mono的mkbundle构建此应用程序https://github.com/nddipiazza/Sharepoint-Exporter,以便它创建一个可以在不具有Mono的Linux机器上运行的可执行文件.

I'm trying to build this app https://github.com/nddipiazza/Sharepoint-Exporter with mono's mkbundle so that it creates an executable that can be run on Linux machine without Mono on it.

我似乎找不到执行此操作的命令.

I can't seem to find the commands to do this.

以下是我到目前为止已完成的步骤.但是它们仅在我在机器上安装单声道时才起作用.当我不在机器上安装单声道时,我得到: ./SpPrefetchIndexBuilder.bin:加载共享库时出错:libmonosgen-2.0.so.1:无法打开共享对象文件:没有这样的文件或目录

Below are the steps I've got so far. But they only work when I install mono on the machine. When I do not install mono on the machine I get: ./SpPrefetchIndexBuilder.bin: error while loading shared libraries: libmonosgen-2.0.so.1: cannot open shared object file: No such file or directory

如果在其中添加--static,则会出现另一个错误:

If I add --static to that, I get another error:

找不到或无法加载程序集mscorlib.dll.
它应该已经安装在"/usr/lib/mono/4.5/mscorlib.dll"目录中.

有什么想法吗?

安装MonoDevelop.

Install MonoDevelop.

在Mono Develop中打开解决方案文件.

Open the Solution file in Mono Develop.

将Sharepoint 2013 SDK DLL复制到/path/to/Sharepoint-Exporter/SpCrawler目录.

Copy the Sharepoint 2013 SDK DLLs into the /path/to/Sharepoint-Exporter/SpCrawler directory.

在解决方案视图中,右键单击引用"->编辑参考-> .NET程序集->浏览->导入您放入的DLL /path/to/Sharepoint-Exporter/SpCrawler

In solution view, Right click on Reference -> Edit References -> .NET Assembly -> Browse -> Import the DLLs you put in /path/to/Sharepoint-Exporter/SpCrawler

Ctrl + F8选择发布"从构建配置中下拉,然后按Ctrl + F8来构建项目.

Ctrl+F8 Select the "Release" drop down from the build configuration and Ctrl+F8 to build the project.

现在运行此命令以构建Linux .bin文件:

Now run this to build the Linux .bin file:

cd /path/to/Sharepoint-Exporter/SpCrawler/bin/Release
mkbundle --static -o SpPrefetchIndexBuilder.bin /path/to/Sharepoint-Exporter/SpCrawler/bin/Release/SpPrefetchIndexBuilder.exe -L /usr/lib/mono/4.6.1-api -L /home/ndipiazza/lucidworks/Sharepoint-Exporter/SpCrawler

此时,

/path/to/Sharepoint-Exporter/SpCrawler/bin/Release/SpPrefetchIndexBuilder.bin http://yoursphost /your/output/path domain username

应该像在Windows上一样工作.

should work just like it had worked for Windows.

推荐答案

我认为这应该是类似的要求,并且我在线程中分享了自己的观点:

I think this should be similar requirement and I have shared my opinions in the thread: https://social.msdn.microsoft.com/Forums/office/en-US/099ac029-e31f-4cc8-b079-16bc011c65d0/csom-sharepoint-cannot-call-fileopenbinarydirect-when-running-on-mono?forum=sharepointdevelopment

最好的问候

Lee Liu


这篇关于使用mkbundle在Mono上构建CSOM c#应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆