在Visual Studio 2012中使用SharePoint App的AppManifest中出错

时间:2014-02-25 20:49:29

标签: visual-studio manifest sharepoint-2013

我的应用清单中有以下内容:

    <?xml version="1.0" encoding="utf-8" ?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
     Name="TestSharePointApp"
     ProductID="{08c44f45-d7ef-4c8f-b808-043a48f44bcf}"
     Version="1.0.0.0"
     SharePointMinVersion="15.0.0.0"
>
  <Properties>
    <Title>TestSharePointApp</Title>
    <StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
  </Properties>

  <AppPrincipal>
    <AutoDeployedWebApplication/>
    <RemoteWebApplication ClientId="*" />
  </AppPrincipal>

  <AppPrerequisites> 
    <AppPrerequisite Type="AutoProvisioning" ID="RemoteWebHost" /> 
  </AppPrerequisites> 
</App>

我收到RemoteWebApplication元素的以下错误:

The element 'AppPrincipal' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest' has invalid child element 'RemoteWebApplication' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest'.

我正在使用SharePoint App项目模板。我正在尝试为内部部署的SharePoint应用程序目录创建一个高信任度的应用程序

对此错误的任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:0)

取出界限:

<AutoDeployedWebApplication/>

您只能在自动加载的应用中使用该行,或者在提供商托管的应用中使用该行下方的行。您只能在单个应用清单中使用其中一个。由于您说您正在为内部部署SharePoint创建高信任度应用程序,因此您希望使用此行:

<RemoteWebApplication ClientId="*" />