asp.net-mvc-2 – 使用.Net Framework 4.0的Sharepoint 2010 Foundation

我有一个Web应用程序,其构建目标为.Net Framework 4.0.
我想与Sharepoint对象模型API进行交互,但它给出了框架4.0运行时不支持Sharepoint.dll错误.

是他们的任何调整,我可以使用Sharepoint 2010与.Net Framework4.0.

注意:我无法将Web应用程序的构建目标更改为任何其他框架,因为我在我的应用程序中使用了.net 4.0的一些独有功能.

解决方法

对不起,你可能没有运气:

There appears to be some confusion
around whether or not ASP.NET 4 is
supported for both MOSS and SharePoint
2010 – in short,the answer is that it
is not currently supported in either
product.

Whilst it is possible to use ASP.NET
3.5 in MOSS by making some modifications to the SharePoint site
web.config (instructions for doing
that in MOSS here; SP2010 uses 3.5 by
default),this is unfortunately not
the case with version 4.

The reason? ASP.NET 4 uses a new
version of the Common Language Runtime
(CLR). Whilst .NET 2.0,3.0 and 3.5
all used version 2.0 of the CLR,.NET
4 uses version 4. I’m not entirely
sure what happened to version 3. There
is a decent post on stack overflow
with further details.

SharePoint 2010 and .NET 4: confused?

也许.NET 4.0支持将在未来的更新(SP1?)中添加谁知道…

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....