SharePoint应用程序部署错误:"无法安装SharePoint应用程序"

Pra*_*nan 14 deployment sharepoint sharepoint-2013 sharepoint-apps

当我尝试添加SharePoint mvc应用程序时,我收到以下错误:

Error occurred in deployment step 'Install app for SharePoint': 
Failed to install app for SharePoint. Please see the output window for details.
Run Code Online (Sandbox Code Playgroud)

详细的堆栈跟踪:

CorrelationId: 50583239-71cb-4b07-8bcb-4bbc51a22631
     ErrorDetail: There was a problem with activating the app web definition.
     ErrorType: App
     ErrorTypeName: App Related
     ExceptionMessage: Microsoft.SharePoint.SPException: Exception from HRESULT: 0x81070964 ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x81070964
at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)
at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionModules(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)
at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)
at Microsoft.SharePoint.SPFeatureCollection.AddInternal(Guid featureId, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)
at Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope)
at Microsoft.SharePoint.SPUserSolutionCollection.EnsureWebFeaturesActivated(SPUserSolution solution)
at Microsoft.SharePoint.Packaging.SPUserCodeSolutionDeploymentGroup.ActivateSolution(SPWeb web, SPUserSolution solution)
at Microsoft.SharePoint.Packaging.SPUserCodeSolutionDeploymentGroup.Deploy()
at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()
at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()
     Source: AppWeb
     SourceName: App Web Deployment
Run Code Online (Sandbox Code Playgroud)

有人可以解决这个问题吗?:)

dca*_*son 21

这是因为SharePoint正在尝试将您的应用程序激活为标准SharePoint功能,当它真的是一个应用程序时.

在SharePoint项目的features文件夹中,将有一个名为Feature1的功能.

打开Feature1并确保它包含在"解决方案中的项目"列表中,而不是"功能中的项目"列表中.

之后,您应该能够部署.


小智 11

更新我的NuGet包后,我遇到了同样的问题.添加了一个名为version.json的文件并导致此问题.将部署类型设置为NoDeployment会修复它.

  • 值得一提的是,在Sharepoint Online上被封锁了http://office.microsoft.com/en-us/office365-sharepoint-online-small-business-help/types-of-files-that-c​​annot-be-added-to -a-列表或库,HA101907868.aspx (3认同)

小智 6

在我的sharepoint托管的加载项中,当我在我的sharepoint项目文件夹中有一些*.json文件(.bower.json,bower.json)时我遇到这个问题,在我删除它们之后再次运行我的应用程序工作!