سؤال

كتبت أداة مساعدة في C # لنسخ الملفات من دليل شبكة إلى مكتبة مستندات SharePoint. عندما يحاول Sys Admin تشغيل .EXE من خادم غير SharePoint، يحصل الخطأ التالي:

استثناء غير معالج: System.io.filenotfoundException: تعذر تحميل الملف أو التجميع "Microsoft.Sharepoint.client أيون= 14.0.0.0، الثقافة= محايد، و publickeytoken= 71e9bce111e9429c 'أو واحدة من تبعياتها. لا يمكن للنظام العثور على F Ile المحدد. اسم الملف: 'Microsoft.Sharepoint.client، الإصدار= 14.0.0.0، الثقافة= محايد، SearchKeyToken= 71E9BCE111E9429C' في spfileupload.program.main ()

wrn: يتم إيقاف تشغيل تسجيل التجميع الملزم. لتمكين عمليات تسجيل فشل التجميع، قم بتعيين قيمة التسجيل [HKLM \ Software \ Microsoft \ Fusion! enableLog] (DWORD) إلى 1.

هل هناك طريقة لتضمين التجميع في بلدي .exe بحيث يتم تشغيله بشكل صحيح؟

تحرير: أنا أستخدم SharePoint 2010 نموذج كائن العميل .

هل كانت مفيدة؟

المحلول

Instructions on how to deploy the SharePoint 2010 Client Object Model assemblies can be found in Client Object Model Distribution and Deployment

Microsoft SharePoint Foundation 2010 installs Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI for easy access in development. You must have both Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll to develop a solution remotely with the .NET managed object model. For a Windows Forms, Windows Presentation Foundation (WPF), or other application that calls the .NET managed SharePoint Foundation client APIs, to function, the client computer must have the SharePoint Foundation client DLLs installed. The client DLLs must be distributed with the application by using Microsoft's SharePoint Foundation 2010 Client Object Model Redistributable.

نصائح أخرى

Please Use NuGet Package Manager to add DLLs to your projectenter image description here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top