开发笔记

Microsoft.Services.Store.Engagement was not included in compilation

本文章记录以前遇到的一个和Microsoft.Services.Store.Engagement有关的问题。当时解决后没想到最近有小伙伴又遇到了,所以在此做个记录。

错误

Method 'StoreServicesEngagementManager.GetDefault()' from assembly 'Microsoft.Services.Store.Engagement' was not included in compilation, but was referenced in xxxxxxx.

描述:只要使用Windows Template Studio 3.3 以前的版本生成了使用Microsoft.Services.Store.Engagement的代码,上传商店后就会出现这个问题。本地测试正常。

解决方法

来自这个issue

This is not an issue with using AppCenter. It can affect any app submitted to the store.

How to fix this in the code in your existing apps

Manually open the csproj file.

change the following lines from

    <SDKReference Include="Microsoft.Services.Store.Engagement, version=10.0">
      <Name>Microsoft Engagement Framework</Name>
    </SDKReference>
    <SDKReference Include="Microsoft.VCLibs, version=14.0">
      <Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
    </SDKReference>

to

    <SDKReference Include="Microsoft.Services.Store.Engagement, Version=10.0">
      <Name>Microsoft Engagement Framework</Name>
    </SDKReference>
    <SDKReference Include="Microsoft.VCLibs, Version=14.0">
      <Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
    </SDKReference>

In both cases, it must be Version (with a capital ‘V’) rather than version.

其实就是把两个SDK的version改成首字母大写的Version

UWP使用WTS问题-Toast Notification

上一篇

UWP WebView修改User-Agent

下一篇

你也可能喜欢

发表评论

您的电子邮件地址不会被公开。 必填项已用 * 标注

提示:点击验证后方可评论!

插入图片
Microsoft.Services.Store.Engagement was not included in compilation

长按储存图像,分享给朋友