1

WMAppManifest.xml で高速アプリ再開の属性を追加した後にコンパイルしようとすると、VS2012 で自分のコンピューターで試したすべてのプロジェクトで、「'ActivationPolicy 属性が宣言されていません'.

Microsoft のサンプルを含む、3 つの異なる Windows Phone 8 プロジェクトを試しました。コンパイルしようとすると、すべてエラーが発生します。それを壊すこの属性を追加しています:ActivationPolicy="Resume" この行に: <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />

WP8 インストールを修復しました。

4

3 に答える 3

2

わかりました、これを投稿して申し訳ありません。私は自分の解決策を見つけました。

Windows Phone 8 SDK を完全にアンインストールしてから再インストールしました。(修理してもダメでした)

于 2012-12-15T17:59:59.273 に答える
0

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas にあるファイル YamanoteCommonTypes.xsd を確認します。

そのファイルで、既存のものの上に次の xml 定義をカット アンド ペーストします。

<xs:simpleType name="ST_ActivationPolicyThirdParty">
<xs:annotation>
    <xs:documentation>
    The activation policy of a 3rd party task
    </xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
    <xs:enumeration value="Resume"/>
    <xs:enumeration value="Replace"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="CT_ThirdPartyExtendedAppTask">
<xs:annotation>
<xs:documentation>
    Represents an entry point container
</xs:documentation>
</xs:annotation>
<xs:sequence>
    <xs:element name="BackgroundServiceAgent" type="CT_BackgroundServiceAgent" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Name" type="xs:ID" use="required"/>
<!-- These attributes will only be parsed if the runtimetype is ST_RuntimeType::ModernNative -->
<xs:attribute name="ImagePath" type="y:ST_String" use="optional" />
<xs:attribute name="ImageParams" type="y:ST_String" use="optional" />
</xs:complexType>
于 2013-02-26T05:15:26.793 に答える
0

これが発生するもう 1 つの理由は、WP8 にアップグレードされていない古い wp7 プロジェクトがあるためです。

于 2012-12-29T17:23:17.463 に答える