簡體   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