繁体   English   中英

无法在Visual Studio 2012中打开SharePoint 2010程序包

[英]Cannot open SharePoint 2010 Package in visual studio 2012

我尝试使用Visual Studio 2012在TFS 2012上开发SharePoint 2010解决方案,我在计算机上创建了该项目并将其添加到TFS中。 但是当我的团队之一获取最新版本并签入解决方案时,任何人尝试获取最新版本并打开软件包都会出现以下错误(出现在“巨大消息”框中):



Microsoft Visual Studio

构图产生单个构图错误。 根本原因在下面提供。 查看CompositionException.Errors属性以获取更多详细信息。

1)对象引用未设置为对象的实例。

结果是:在类型为“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel”上调用“ OnImportsSatisfied”方法时发生了异常。

结果:无法激活部件“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel”。

元素:Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel-> Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel-> AssemblyCatalog(Assembly =“ Microsoft.VisualStudio.SharePoint.Designers.Package,Version = 11.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a“)

结果:无法从“ Microsoft.VisualStudio.SharePoint.Designers”部分导出“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel”)”。 .Package.ViewModels.PackageViewModel”。

元素:Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel”)-> Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel -> AssemblyCatalog(Assembly =“ Microsoft.VisualStudio.SharePoint.Designers.Package,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”)

结果:无法在部分Microsoft.VisualStudio.SharePoint上设置导入Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider.ViewModel(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel”)'。 .Designers.Package.ViewProviders.PackageDesignViewProvider”。

元素:Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider.ViewModel(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel”)-> Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders .PackageDesignViewProvider-> AssemblyCatalog(Assembly =“ Microsoft.VisualStudio.SharePoint.Designers.Package,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”)

结果:无法从“ Microsoft.VisualStudio.SharePoint.Designers”部分导出“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.IViewProvider”)”。 .Package.ViewProviders.PackageDesignViewProvider”。

元素:Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider(ContractName =“ Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.IViewProvider”)-> Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider -> AssemblyCatalog(Assembly =“ Microsoft.VisualStudio.SharePoint.Designers.Package,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”)

结果:在对类型为Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost`1 [[Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package,Microsoft.VisualStudio .SharePoint.Designers.Models.Packages,版本= 11.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a]]”。

结果:无法激活零件“ Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package)”。

元素:Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package)-> Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio .SharePoint.Designers.Models.Packages.Package)


在此处输入图片说明

AFAIK您无法使用VS2012 coz 2012工具创建SharePoint 2010解决方案(WSP软件包),仅支持SP2013(尽管csproj和项目结构非常相似)。

您可能可以使用VS2012和SP2010引用的dll构建dll(库),然后使用wspbuilder创建针对SP2013的wsp(与SP2013的良好兼容性,将部署到2010配置单元中)。

我明白了,当Visual Studio尝试从GAC获取与SharePoint包设计器相关的程序集时,就会出现此错误,只需通过Microsoft Web平台安装程序或Visual Studio安装“ Visual Studio的Office开发工具 ”,它就会起作用

谢谢

暂无
暂无

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

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