简体   繁体   English

在SharePoint 2010中以编程方式创建.NET程序集连接器

[英]Create .NET assembly connector programmatically in SharePoint 2010

Does anybody know how to create a .NET assembly connector programmatically? 有人知道如何以编程方式创建.NET程序集连接器吗? I mean I want to generate an .NET assembly in runtime using Reflection.Emit and deploy it to SharePoint. 我的意思是我想在运行时使用Reflection.Emit生成.NET程序集并将其部署到SharePoint。

I've found this great post: 我发现了这篇很棒的文章:

http://www.toddbaginski.com/blog/archive/2009/12/01/how-to-programmatically-create-a-sharepoint-2010-external-content-type.aspx http://www.toddbaginski.com/blog/archive/2009/12/01/how-to-programmatically-create-a-sharepoint-2010-external-content-type.aspx

where a database external type is created, but I need to create an external type based on a .NET assembly 创建数据库外部类型的位置,但是我需要基于.NET程序集创建外部类型

Thanks 谢谢

This is not really an answer to your question, but just an observation/suggestion. 这实际上不是您问题的答案,而只是一个观察/建议。 In order to deploy an assembly that SharePoint will use you have to get it in the GAC. 为了部署SharePoint将使用的程序集,您必须在GAC中获取它。 I would think if you created some code to Emit the assembly then had either your current app or another app create a PowerShell script to add the assembly to the GAC and wire up all the SharePoint STSADM stuff, then you could accomplish what you want. 我想如果您创建了一些代码来发送程序集,然后让当前应用程序或另一个应用程序创建PowerShell脚本以将该程序集添加到GAC并连接所有SharePoint STSADM东西,那么您就可以完成所需的工作。 I may have better ideas with more details of where you are generating the new assembly (from some external app, etc). 对于在哪里(从某些外部应用程序等生成新程序集)的更多详细信息,我可能会有更好的主意。 Hope this helps or at least sparks some ideas. 希望这有助于或至少激发出一些想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM